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  

Check box date stamp



 
 
Thread Tools Display Modes
  #1  
Old December 29th, 2006, 03:07 PM posted to microsoft.public.access.forms
bilbo+
external usenet poster
 
Posts: 31
Default Check box date stamp

Hi there, I have a check box in my form, which when checked means that job is
'dead' and therefore doesnt come up since i changed the record source to only
take jobs that have a false 'dead' checkbox. I wanted to also make it put the
current date into a hidden field of when that check box was ticked so that we
know when it 'died', any ideas? thanks Wk
  #2  
Old December 29th, 2006, 03:31 PM posted to microsoft.public.access.forms
Lynn Trapp
external usenet poster
 
Posts: 173
Default Check box date stamp

1. Add a date/time field to the table your form is based on.
2. Add the field to your form and make it invisible.
3. Add the following code to the Click event of your checkbox:

Me.YourDateField = Date()

--

Lynn Trapp
Microsoft MVP (Access)
www.ltcomputerdesigns.com


"bilbo+" wrote in message
...
Hi there, I have a check box in my form, which when checked means that job
is
'dead' and therefore doesnt come up since i changed the record source to
only
take jobs that have a false 'dead' checkbox. I wanted to also make it put
the
current date into a hidden field of when that check box was ticked so that
we
know when it 'died', any ideas? thanks Wk



  #3  
Old December 29th, 2006, 03:33 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Check box date stamp

Use the AfterUpdate event procedure of the check box to record when it died.

Example:

Private Sub Dead_AfterUpdate()
If Me.Dead.Value Then
Me.[MyHiddenDateBox] = Now()
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"bilbo+" wrote in message
...
Hi there, I have a check box in my form, which when checked means that job
is
'dead' and therefore doesnt come up since i changed the record source to
only
take jobs that have a false 'dead' checkbox. I wanted to also make it put
the
current date into a hidden field of when that check box was ticked so that
we
know when it 'died', any ideas? thanks Wk


  #4  
Old December 29th, 2006, 03:56 PM posted to microsoft.public.access.forms
bilbo+
external usenet poster
 
Posts: 31
Default Check box date stamp

hi there, do i put that in the code bit or just in the properties box.. is
there more code i need to put in as well... sorry im a bit of a begginner..

"Lynn Trapp" wrote:

1. Add a date/time field to the table your form is based on.
2. Add the field to your form and make it invisible.
3. Add the following code to the Click event of your checkbox:

Me.YourDateField = Date()

--

Lynn Trapp
Microsoft MVP (Access)
www.ltcomputerdesigns.com


"bilbo+" wrote in message
...
Hi there, I have a check box in my form, which when checked means that job
is
'dead' and therefore doesnt come up since i changed the record source to
only
take jobs that have a false 'dead' checkbox. I wanted to also make it put
the
current date into a hidden field of when that check box was ticked so that
we
know when it 'died', any ideas? thanks Wk




 




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 07:23 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.