Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS Access Checkbox IF

Posted on 2010-11-08
6
Medium Priority
?
488 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

730 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