Solved

MS Access Checkbox IF

Posted on 2010-11-08
6
481 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
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!

 
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 500 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 30

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

628 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