Auto filling date field, by checkbox field (1 Viewer)

QueryStumped

Registered User.
Local time
Today, 03:27
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!!
 

isladogs

MVP / VIP
Local time
Today, 08:27
Joined
Jan 14, 2017
Messages
18,246
Add code to the checkbox click event. Something like

Code:
private sub chkbox1_click()

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

End sub
 

QueryStumped

Registered User.
Local time
Today, 03:27
Joined
Mar 22, 2017
Messages
60
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?
 

QueryStumped

Registered User.
Local time
Today, 03:27
Joined
Mar 22, 2017
Messages
60
Thank you for your quick response, i really appreciate it. Learning as i go, in my new position.
 

isladogs

MVP / VIP
Local time
Today, 08:27
Joined
Jan 14, 2017
Messages
18,246
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
 

QueryStumped

Registered User.
Local time
Today, 03:27
Joined
Mar 22, 2017
Messages
60
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!
 

isladogs

MVP / VIP
Local time
Today, 08:27
Joined
Jan 14, 2017
Messages
18,246
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

Top Bottom