L
Lorraine
Thanks for the help but it is still not working. I have
also created OpenForm macros and have tried to put
the following code in the LostFocus event of the combobox
but this did not work either:
Am I missing a step? Does Access look at my options table
to descide which case to run? Maybe my code is not linking
to the options table. How do I link that?
Private Sub cmbID_tag_LostFocus()
Select Case Me!cmbID_tag
Case 1
DoCmd.RunMacro (OpenN_switches_Entry_Form)
Case 2
DoCmd.RunMacro (OpenID_tags_other_Entry_Form)
Case 3
DoCmd.RunMacro (Openprinters_Entry_Form)
Case 4
DoCmd.RunMacro (OpenS_Entry_Form)
Case 5
DoCmd.RunMacro (OpenC_Entry_Form)
End Select
End Sub
also created OpenForm macros and have tried to put
the following code in the LostFocus event of the combobox
but this did not work either:
Am I missing a step? Does Access look at my options table
to descide which case to run? Maybe my code is not linking
to the options table. How do I link that?
Private Sub cmbID_tag_LostFocus()
Select Case Me!cmbID_tag
Case 1
DoCmd.RunMacro (OpenN_switches_Entry_Form)
Case 2
DoCmd.RunMacro (OpenID_tags_other_Entry_Form)
Case 3
DoCmd.RunMacro (Openprinters_Entry_Form)
Case 4
DoCmd.RunMacro (OpenS_Entry_Form)
Case 5
DoCmd.RunMacro (OpenC_Entry_Form)
End Select
End Sub
..-----Original Message-----
Your options should be in a table that looks like this:
TblOption
OptionID
Option
and OptionID should be 1 to 5.
You can then put the following code in the AfterUpdate event of the combobox:
Select Case Me!NameOfCombobox
Case 1
DoCmd.OpenForm "DataEntryForm1"
Case 2
DoCmd.OpenForm "DataEntryForm2"
Case 3
DoCmd.OpenForm "DataEntryForm3"
Case 4
DoCmd.OpenForm "DataEntryForm4"
Case 5
DoCmd.OpenForm "DataEntryForm5"
End Select
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
.