Setting a condition in a Macro (lookin at a check box in a form)

stuboyle

New member
Local time
Yesterday, 21:22
Joined
Jan 24, 2011
Messages
2
I am trying to set a condition in a macro based on whether a check box is a form is checked or not. This is my condition:

IsEmpty([Forms]![frm_Build_ARMS]![Check8])=False

I've also tried:

IsNull([Forms]![frm_Build_ARMS]![Check8])=False

Currently, I am just having it display a MsgBox if the condition is met. However, the MsgBox is displayed regardless of whether the check box is checked or not in the form.

Can anyone help?
 
I am trying to set a condition in a macro based on whether a check box is a form is checked or not. This is my condition:

IsEmpty([Forms]![frm_Build_ARMS]![Check8])=False

I've also tried:

IsNull([Forms]![frm_Build_ARMS]![Check8])=False

Currently, I am just having it display a MsgBox if the condition is met. However, the MsgBox is displayed regardless of whether the check box is checked or not in the form.

Can anyone help?

try:
Code:
if forms("frm_build_ARMS").controls("Check8").value = -1 then
         'checkbox is checked, put your code in here
end if
 
Actually, I am not writing code but using the macro builder thingy. It didn't except the code you suggested. Though after looking at what you did and sleeping on it I figured it out. All I needed was:

[Forms]![frm_Build_ARMS]![Check8]=False

-or-

[Forms]![frm_Build_ARMS]![Check8]=True

depending on if I want it checked or not.

Thanks for you help!
 

Users who are viewing this thread

Back
Top Bottom