Solved

MS Access Checkbox IF

Posted on 2010-11-08
6
479 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
Independent Software Vendors: 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dcount Expression giving error ". . .   contains invalid syntax" 9 66
Combo box question 6 55
Intermittent OleDbConnection Error 20 53
View SQL Count Records 3 32
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

751 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