Multiple Option Groups Sychronize Issues in Form_Current

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

Guest

Tryng to place 4 Option Groups in Form_Current so that I can see text vales in bith table and on form. I was able to get one to work but if I try 2 or more I get ambiguous name with Form_Current although the fist one says Form_Current()
Below is the sample I followed. I first had to place a test box on the form to convert the numbers to test and this below will allow one to see what is selected on the form.

What is the secret if using 2 or more option groups in this case? Like I said one works great.

Private Sub Form_Current()
' This procedure examines the value of the Department
' field as displayed in the Department text box and
' sets the value of the option group (Frame6) to the
' appropriate number.
Select Case Department.Value
Case "Design"
Frame6.Value = 1
Case "Production"
Frame6.Value = 2
Case "Marketing"
Frame6.Value = 3
Case "Sales"
Frame6.Value = 4
Case "Shipping"
Frame6.Value = 5
Case Else
Frame6.Value = Null
End Select
End Sub
 
Brian if you are using the same value(department to determine the option
groups values just do this:

Private Sub Form_Current()
Select Case Department.Value
Case "Design"
Frame6.Value = 1
Frame7.Value = 1
Case "Production"
Frame6.Value = 2
Frame7.Value = 2
Case Else
some code here if desired
End Select
End Sub

If you are using a different value as criteria just add another select
statement after the first one as so:

Private Sub Form_Current()
Select Case Department
Case "Design"
Frame6.Value = 1
Frame7.Value = 1
Case "Production"
Frame6.Value = 2
Frame7.Value = 2
Case Else
some code here if desired
End Select

Select Case DivNumber
Case 1
Frame6.Value = 1
Frame7.Value = 1
Case 2
Frame6.Value = 2
Frame7.Value = 2
Case Else
some code here if desired
End Select
End Sub

--
Reggie

----------
bdehning said:
Tryng to place 4 Option Groups in Form_Current so that I can see text
vales in bith table and on form. I was able to get one to work but if I try
2 or more I get ambiguous name with Form_Current although the fist one says
Form_Current()
Below is the sample I followed. I first had to place a test box on the
form to convert the numbers to test and this below will allow one to see
what is selected on the form.
 
Back
Top