Conditionally run macro

Grimmers

Registered User.
Local time
Tomorrow, 05:03
Joined
Aug 1, 2002
Messages
21
I have a subform sf_members on a main form f_membership.
I am trying to conditionally run a macro based on a check box in one of the records in the subform.
If one or more of the checks is ticked I want to run the macro else throw a message box.
I have tried various VBA syntaxes but none seem to do the trick.

Thanks in advance,


David
 
Gemma,

This just gives me "object required"

Code:
If sf_members!ysnJnrSel = 0 Then
  MsgBox "The condition is true!"
End If
If sf_members!ysnJnrSel <> 0 Then
  MsgBox "The condition is false!"
End If

The subform is in datasheet mode and may have multiple records. Do I need to count the records that are ticked or something? Sorry to be a pain but it's really bugging me at the moment. (Nearly midnight in OZ!!)

cheers,

David
 

Users who are viewing this thread

Back
Top Bottom