Visble feilds based on condition.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im new to the whole access programming thing so, sorry if this doesnt really
make much sense.
I need to create something that will make a feild in a form visble or not
visble based on two other fields.
for example
If feild 1 is set to saturday and feild 2 is set to evening then feild
3(extended duration) is set to visble.
Thanks for any help.
 
you can run code in the form's Current event, and also in the AfterUpdate
events of the two "other" controls (assuming that the data in those fields
can be edited in the form), as

Me!Control3.Visible = (Me!Control1 = "saturday" _
And Me!Control2 = "evening")

hth
 
Ok thanks.
anothe quick question, what is the Me! bit? (ive never done programming in
access before)
 
you can use the Me keyword in a form or report module, as a quick way to
refer to the object that the code is running from, instead of using a full
reference such as

Forms!FormName

look up the Me Property topic in Access VBA Help for more information.

hth
 
Back
Top