Using Option Groups to run macros

Neil_Pattison

Registered User.
Local time
Today, 16:59
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
 
Thanks for looking but I've now figured this out. Its been a long day
 

Users who are viewing this thread

Back
Top Bottom