Auto filling date field, by checkbox field

QueryStumped

Registered User.
Local time
Today, 05:18
Joined
Mar 22, 2017
Messages
60
Hello....I am needing to know how to have a date field automatically populate with the day's date once a checkbox is checked. Please and Thank You!!
 
Add code to the checkbox click event. Something like

Code:
private sub chkbox1_click()

If me.chkbox1=true then Me.Datecontrolname=Date()

End sub
 
New in creating events for fields on forms. question, so in the design view of the form where the 2 fields are, I will right click on the date field, under properties and add under the all tab?
 
Thank you for your quick response, i really appreciate it. Learning as i go, in my new position.
 
New in creating events for fields on forms. question, so in the design view of the form where the 2 fields are, I will right click on the date field, under properties and add under the all tab?

No.
In design view, click the checkbox control then go to the property sheet, click the Event tab ...On Click event.
Select Event Procedure then click the ellipsis button with 3 dots (AKA browse button) to open the code window at that procedure.
Enter code similar to that in my first reply but using your control names
 
Thank you Colin and Paul, I really appreciate your help. I absolutely love this website, very positive feedback since I joined. Programming is not my forte. But I am learning, and it worked. Thank you all!
 
You're welcome. Remember we were all beginners at one point.

Thanks to Paul for adding 'flesh' to my explanation.
 

Users who are viewing this thread

Back
Top Bottom