Make text boxes visible

J

Jim L.

Thanks to all of your help, my fuel station database is working well, and
being used by several people in the office. I am now going back and making
some aesthetic changes. I am working on a form with a label that I would
like to build a code for the "on double click" event. When the [Fuel Added]
label is double clicked, I need 2 things to happen. First, I need to set the
value of the [DelDate] text box (which is not visible), to equal the value
that was manually entered in the [Date] textbox at the top of the form. At
the same time, I have 11 textboxes ([Add1],[Add2], etc.) that I want to
become visible.
Not sure of the syntax for writing the code, so as always, any help would be
appreciated.
 
J

Jim L.

Steve,
I tried this, and it spit an error code at me.
Runtime error '2465':
Microsoft Office Access can't find the field 'Act1' referred to in your
expression.
I entered the names of each field in place of what was in parentheses for
each tank, and all is working perfectly now. Thanks much for getting me
started.

Steve said:
Hi Jim,

Two big utohs in your database ...
1. Date is a reserved word in Access and should not be used as a field
name or object name.
2. Your 11 textboxes ([Add1],[Add2], etc indicate you have 11 fields in a
table of the same type but different names. This indicates a misdesign of
your tables.

Irregardless of the above, to answer your question ..........

Use the following code:
Dim I As Integer
Me!DelDate = Me!Date
For I = 1 to 11
Me("Act" & I).Visible = True
Next I

Steve
(e-mail address removed)


Jim L. said:
Thanks to all of your help, my fuel station database is working well, and
being used by several people in the office. I am now going back and
making
some aesthetic changes. I am working on a form with a label that I would
like to build a code for the "on double click" event. When the [Fuel
Added]
label is double clicked, I need 2 things to happen. First, I need to set
the
value of the [DelDate] text box (which is not visible), to equal the value
that was manually entered in the [Date] textbox at the top of the form.
At
the same time, I have 11 textboxes ([Add1],[Add2], etc.) that I want to
become visible.
Not sure of the syntax for writing the code, so as always, any help would
be
appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top