E
EvilSewingMachine
I'm building product configurator forms. There are 6 subforms, each
one dedicated to a product line that have 35 or so options each. I'm
using the visible property to show or hide various controls depending
on the product selected.
Then depending on the those options chosen more controls appear or
become enabled depending on the selections.
I'm using "OnGotFocus" to hide or show controls and then an IIF
Statement in the "OnCurrent" of the form to to check the fields in the
table to display previously entered configurations correctly.
IF Field1 = 1 Then
Control1.Visible = False
Else Control1.Visible = True
End IF
IF Field2 = 1 Then
Control2.Visible = False
Else Control2.Visible = True
End IF
IF Field3 = 1 Then
Control3.Visible = False
Else Control3.Visible = True
End IF
And so on and so forth for all of the options.
Is this the best way to code this? It seems kind of redundant using
the OnGotFocus to switch the visible properties and then using
OnCurrent with all those IF statements to bring back each records
settings. What kind of problems does anyone foresee?
I'm new to VB and Access, your advice is like a lighthouse on the
shore line.
one dedicated to a product line that have 35 or so options each. I'm
using the visible property to show or hide various controls depending
on the product selected.
Then depending on the those options chosen more controls appear or
become enabled depending on the selections.
I'm using "OnGotFocus" to hide or show controls and then an IIF
Statement in the "OnCurrent" of the form to to check the fields in the
table to display previously entered configurations correctly.
IF Field1 = 1 Then
Control1.Visible = False
Else Control1.Visible = True
End IF
IF Field2 = 1 Then
Control2.Visible = False
Else Control2.Visible = True
End IF
IF Field3 = 1 Then
Control3.Visible = False
Else Control3.Visible = True
End IF
And so on and so forth for all of the options.
Is this the best way to code this? It seems kind of redundant using
the OnGotFocus to switch the visible properties and then using
OnCurrent with all those IF statements to bring back each records
settings. What kind of problems does anyone foresee?
I'm new to VB and Access, your advice is like a lighthouse on the
shore line.