Help populating a checkbox when a text field in populated

  • Thread starter Thread starter jhsanders025
  • Start date Start date
J

jhsanders025

I'm new at access, but need some help. I have a situation where I have
a text field (i.e. a date field], when that field is populated, I want
a have a check box filled. Can anyone help me with creating code or a
macro to resolve this matter. I have the checkbox field created, but I
do not know how to make it trigger. Thanks in advance.

John
 
You need to put the following code into two events, the form's Current
event, and the textbox's AfterUpdate event:
Me.chkMyCheckBox = IsDate(Me.txtMyTextbox)

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 
I'm new at access, but need some help. I have a situation where I have
a text field (i.e. a date field], when that field is populated, I want
a have a check box filled. Can anyone help me with creating code or a
macro to resolve this matter. I have the checkbox field created, but I
do not know how to make it trigger.


If the check nox is bound to a field in the form's record
source table/query, then use VBA in both the form's Current
event and the text box's After update event:

Me.thecheckbox = Not IsNull(thetextbox)

If the check box is unbound, the you don't need code.
Instead you can just set the check box's Control Source
expression to:

=Not IsNull(thetextbox)
 
Back
Top