aaronjmack
MIS
- May 10, 2001
- 10
>>>>BACKGROUND<<<<
This is what I have: A Server Inventory database using one form based on one Primary table with several separate tables linked to this for use in combo boxes.
The form contains many text and combo boxes, some tabs, and an OptionGroup with 6 OptionButtons. The Server Name is the Key Index and each record is based on this - with detailed information in the controls.
>>>>DESIRED AFFECT<<<<
The OptionGroup is set up for the user to chose one of six configurations. Three Text boxes should remain hidden until one of the last 4 buttons (not the first 2) are selected. Then they should appear to allow information to be entered. These boxes should stay on the form for that record. When the next record is selected, the three Text boxes should either disappear or appear depending on what buttons are selected (or in the case of a new record, be hidden unless activated).
>>>>THE PROBLEM<<<<
On Record 1, Option Number 3 is selected and the three text boxes appear on the form (this is good). When I move to Record 2, Option Number 2 is selected, but the text boxes remain on the screen (this is bad). If I select Option Number 1, the text boxes disappear (again, as expected). But moving to Record 3 with Option Number 3 selected, the text boxes still are hidden.
>>>>THE PLEA<<<<
I'm sure that I am missing some code in a different section of the form, but cannot figure out what I need to do...
Please help if possible.
Thanks,
Aaron J. Mack
The following is the OptionGroup's AfterUpdate code:
>>>>Begin Code<<<<
Private Sub Support_Box_AfterUpdate()
Select Case Me.Support_Box
Case 0, 1, 2
Me.SP_Prod_ID.Visible = False
Me.SP_Number.Visible = False
Me.Support_Date.Visible = False
Me.SP_Prod_ID.ControlSource = "SP_Prod_ID"
Me.SP_Number.ControlSource = "SP_Number"
Me.Support_Date.ControlSource = "Support_Date"
Case 3, 4
Me.SP_Prod_ID.Visible = True
Me.SP_Number.Visible = True
Me.Support_Date.Visible = True
Me.SP_Prod_ID.ControlSource = "SP_Prod_ID"
Me.SP_Number.ControlSource = "SP_Number"
Me.Support_Date.ControlSource = "Support_Date"
Case 5, 6
Me.SP_Prod_ID.Visible = True
Me.SP_Number.Visible = True
Me.Support_Date.Visible = True
Me.SP_Prod_ID.ControlSource = "R_SP_Prod_ID"
Me.SP_Number.ControlSource = "R_SP_Number"
Me.Support_Date.ControlSource = "R_Support_Date"
End Select
End Sub
>>>>End Code<<<<
This is what I have: A Server Inventory database using one form based on one Primary table with several separate tables linked to this for use in combo boxes.
The form contains many text and combo boxes, some tabs, and an OptionGroup with 6 OptionButtons. The Server Name is the Key Index and each record is based on this - with detailed information in the controls.
>>>>DESIRED AFFECT<<<<
The OptionGroup is set up for the user to chose one of six configurations. Three Text boxes should remain hidden until one of the last 4 buttons (not the first 2) are selected. Then they should appear to allow information to be entered. These boxes should stay on the form for that record. When the next record is selected, the three Text boxes should either disappear or appear depending on what buttons are selected (or in the case of a new record, be hidden unless activated).
>>>>THE PROBLEM<<<<
On Record 1, Option Number 3 is selected and the three text boxes appear on the form (this is good). When I move to Record 2, Option Number 2 is selected, but the text boxes remain on the screen (this is bad). If I select Option Number 1, the text boxes disappear (again, as expected). But moving to Record 3 with Option Number 3 selected, the text boxes still are hidden.
>>>>THE PLEA<<<<
I'm sure that I am missing some code in a different section of the form, but cannot figure out what I need to do...
Please help if possible.
Thanks,
Aaron J. Mack
The following is the OptionGroup's AfterUpdate code:
>>>>Begin Code<<<<
Private Sub Support_Box_AfterUpdate()
Select Case Me.Support_Box
Case 0, 1, 2
Me.SP_Prod_ID.Visible = False
Me.SP_Number.Visible = False
Me.Support_Date.Visible = False
Me.SP_Prod_ID.ControlSource = "SP_Prod_ID"
Me.SP_Number.ControlSource = "SP_Number"
Me.Support_Date.ControlSource = "Support_Date"
Case 3, 4
Me.SP_Prod_ID.Visible = True
Me.SP_Number.Visible = True
Me.Support_Date.Visible = True
Me.SP_Prod_ID.ControlSource = "SP_Prod_ID"
Me.SP_Number.ControlSource = "SP_Number"
Me.Support_Date.ControlSource = "Support_Date"
Case 5, 6
Me.SP_Prod_ID.Visible = True
Me.SP_Number.Visible = True
Me.Support_Date.Visible = True
Me.SP_Prod_ID.ControlSource = "R_SP_Prod_ID"
Me.SP_Number.ControlSource = "R_SP_Number"
Me.Support_Date.ControlSource = "R_Support_Date"
End Select
End Sub
>>>>End Code<<<<