A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto update a date field when a checkbox is ticked



 
 
Thread Tools Display Modes
  #1  
Old January 14th, 2010, 12:07 PM posted to microsoft.public.access.forms
Sharon Beresford
external usenet poster
 
Posts: 2
Default Auto update a date field when a checkbox is ticked

Hi All
Does anyone know how I can automatically populate a data/time field when a check box is ticked? This needs to be at record level. thanks


Submitted via EggHeadCafe - Software Developer Portal of Choice
Get Identity Values of Multi-row insert by using OUTPUT Clause
http://www.eggheadcafe.com/tutorials...ues-of-mu.aspx
  #2  
Old January 14th, 2010, 12:40 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Auto update a date field when a checkbox is ticked

If you mean when the check box receives a check (rather than when it is
cleared), in the check box After Update event:

If Me.CheckBoxName = True Then
Me.SomeField = Now()
End If

If you want the time/date to be updated whenever the check box value changes,
leave out the If and End If lines.

If you want the date only, use Date() rather than Now(). Actually, Date()
will store the time, but it will always be midnight. This could make a
difference in sorting under some circumstances.

Sharon Beresford wrote:
Hi All
Does anyone know how I can automatically populate a data/time field when a check box is ticked? This needs to be at record level. thanks

Submitted via EggHeadCafe - Software Developer Portal of Choice
Get Identity Values of Multi-row insert by using OUTPUT Clause
http://www.eggheadcafe.com/tutorials...ues-of-mu.aspx


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201001/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.