D
Damien McBain
I am designing a "data entry" form (new records only) where the user will
first select a "type" from a combo box, then certain controls (mostly text
boxes) will become visible as a result of the AfterUpdate event of the combo
box.
The values in the combo box come from a table (tblTypes) and may change at
some time or other. I therefore don't want to hard code the various "types"
into the code which sets the controls' visible property ie:
If combo1.text = "blah1" then
Me!TextBox1.Visible = True
Me!TextBox2.Visible = True
If combo1.text = "blah2" then
Me!TextBox3.Visible = True
Me!TextBox4.Visible = True
etc
....because I might end up with a blah3 and blah4 at some stage.
Is there a way I can make this dynamic? Maybe I could create a yes/no field
in the "tblTypes" table for each control available on the data entry form
and set the value to yes if I want a certain control to be visible for that
"type", but then how would I use it to set the required properties?
first select a "type" from a combo box, then certain controls (mostly text
boxes) will become visible as a result of the AfterUpdate event of the combo
box.
The values in the combo box come from a table (tblTypes) and may change at
some time or other. I therefore don't want to hard code the various "types"
into the code which sets the controls' visible property ie:
If combo1.text = "blah1" then
Me!TextBox1.Visible = True
Me!TextBox2.Visible = True
If combo1.text = "blah2" then
Me!TextBox3.Visible = True
Me!TextBox4.Visible = True
etc
....because I might end up with a blah3 and blah4 at some stage.
Is there a way I can make this dynamic? Maybe I could create a yes/no field
in the "tblTypes" table for each control available on the data entry form
and set the value to yes if I want a certain control to be visible for that
"type", but then how would I use it to set the required properties?