type mismatch in macro

Ligaya

Registered User.
Local time
Today, 21:41
Joined
Apr 21, 2007
Messages
49
I have form with an option group (to select a gender) which is as follows:

Option 1 = Male
Option 2 = Female

After choosing on an option, a command button with the caption REGISTER is clicked. A macro is attached to the command button with conditions as follows:
[Forms]![frmGender]![OptAnswer]=1 (Msgbox "You registered as male")
[Forms]![frmGender]![OptAnswer]=2 (Msgbox "You registered as female")
[Forms]![frmGender]![OptAnswer] Is Null (Msgbox "You have not registered")

Instead of the message showing, a box with "Type mismatch" comes up.

I have checked the spelling, but I am getting nowhere. Could someone please steer me in the right direction?

Many thanks,
Ligaya
 
Type mismatch in Macros

Hello Ken,

Thank you for responding so quickly. I'm still grappling with it.

I tried and got a Run-time error '424': Object Required.

I don't know what this means so I will look it up and will try again.
Thanks again.

Regards,
Ligaya
 

Users who are viewing this thread

Back
Top Bottom