Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS Access Checkbox IF

Posted on 2010-11-08
6
Medium Priority
?
493 Views
Last Modified: 2012-05-10
Hi Experts,

I have a checkbox with event function IF statement.

If Me.Check604 = False Then
MsgBox ("Please complete the form")
End If

So what happen here is, a msgbox appeared and the Check604 is checked.

What code should I input to let check604 remain uncheck?

Thanks.
0
Comment
Question by:rutlandict
6 Comments
 

Expert Comment

by:lancegallagher_expertsexchange
ID: 34083651
You can just set the check box control to locked
0
 

Author Comment

by:rutlandict
ID: 34083758
There's no other option besides this? Thanks
0
 

Expert Comment

by:lancegallagher_expertsexchange
ID: 34083881

Me.Check604.Value = False
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 34083891
Where did you put that code? Try to put that code on the Close event of the form.

Sincerely,
Ed
0
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 2000 total points
ID: 34083964
First of all, set the default value of the checkbox to 0. Then use the code below:

If Me.Check604 = 0 Then
MsgBox ("Please complete the form")
End If

See screenshot attached.

Sincerely,
Ed
DefaultValue.JPG
0
 
LVL 31

Expert Comment

by:hnasr
ID: 34084165
You want the Checkbox to be checked. If not display the message.

So put your code int the Check604_AfterUpdate event.

You may need to validate your input in forms beforeUpdate event.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question