Neil_Pattison
Registered User.
- Local time
- Today, 17:17
- Joined
- Aug 24, 2005
- Messages
- 73
Hi all.
I have an option group set up on a form with two options. I want the user to be able to select an option and then click on a command button to run 1 of 2 macros.
I thought the code behind the cmdbutton would be simple but i keep getting the runtime error 2502.
The code I have used is:
Private Sub cmdButtonName_Click()
Select Case Me.FrameName
Case 1
DoCmd.RunMacro (mcr_1)
Case 2
DoCmd.RunMacro (mcr_2)
End Select
End Sub
This is probably really easy and I'm just having a mental breakdown or something but any help would be greatly appreciated
I have an option group set up on a form with two options. I want the user to be able to select an option and then click on a command button to run 1 of 2 macros.
I thought the code behind the cmdbutton would be simple but i keep getting the runtime error 2502.
The code I have used is:
Private Sub cmdButtonName_Click()
Select Case Me.FrameName
Case 1
DoCmd.RunMacro (mcr_1)
Case 2
DoCmd.RunMacro (mcr_2)
End Select
End Sub
This is probably really easy and I'm just having a mental breakdown or something but any help would be greatly appreciated