Avatar of rutlandict
rutlandictFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

MS Access Checkbox IF

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.
Microsoft Access

Avatar of undefined
Last Comment
Hamed Nasr
Avatar of lancegallagher_expertsexchange
lancegallagher_expertsexchange

You can just set the check box control to locked
Avatar of rutlandict
rutlandict
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

There's no other option besides this? Thanks

Me.Check604.Value = False
Avatar of MINDSUPERB
MINDSUPERB
Flag of Kuwait image

Where did you put that code? Try to put that code on the Close event of the form.

Sincerely,
Ed
ASKER CERTIFIED SOLUTION
Avatar of MINDSUPERB
MINDSUPERB
Flag of Kuwait image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

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.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo