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  

click on check box to add an entry date



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2004, 02:39 AM
Greg
external usenet poster
 
Posts: n/a
Default click on check box to add an entry date

Hi

Can some one help me
What i want to do is when i click on a check box in a record it puts the
current date and time in a text box or feild can this be done

Thanks


Greg


  #2  
Old June 1st, 2004, 03:43 AM
John Vinson
external usenet poster
 
Posts: n/a
Default click on check box to add an entry date

On Tue, 1 Jun 2004 02:39:00 +0100, "Greg" wrote:

Hi

Can some one help me
What i want to do is when i click on a check box in a record it puts the
current date and time in a text box or feild can this be done

Thanks


Greg


Yes, but I'd suggest skipping a step; you can put in some simple code
to let the user just doubleclick a textbox and store the current
date/time.

With the checkbox, put code in the checkbox's AfterUpdate event:

Private Sub chkMyCheckbox_AfterUpdate()
If Me!chkMyCheckbox = True Then ' leave this out if you always
' want to update the date field, leave it in to set the date
' only when the user sets the checkbox to True
Me!txtDateTimeField = Now()
End If ' leave this out too if you leave out the If
End Sub

To doubleclick, use txtDateTimeField's DoubleClick event and just set
Me!txtDateTimeField to Now().

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #3  
Old June 1st, 2004, 05:08 PM
Greg
external usenet poster
 
Posts: n/a
Default click on check box to add an entry date

Thanks john

That works fine except when I check the check box on the next record it
globally changes the time and date to all the records to present time and
date what I want to do is when I check( tick) the checkbox it stores the
current time and date for that particular record and when I got another
record it stores the current time and date.
so in the future I can see when I made a particular record entry

Thanks

Greg
"Greg" wrote in message
...
Hi

Can some one help me
What i want to do is when i click on a check box in a record it puts the
current date and time in a text box or feild can this be done

Thanks


Greg




  #4  
Old June 1st, 2004, 09:37 PM
John Vinson
external usenet poster
 
Posts: n/a
Default click on check box to add an entry date

On Tue, 1 Jun 2004 17:08:14 +0100, "Greg" wrote:

That works fine except when I check the check box on the next record it
globally changes the time and date to all the records to present time and
date what I want to do is when I check( tick) the checkbox it stores the
current time and date for that particular record and when I got another
record it stores the current time and date.


It sounds like your date/time textbox is unbound, i.e. it's not being
stored in any table record. If you don't store the date/time field in
the table then you CAN'T do what you ask!

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #5  
Old June 2nd, 2004, 06:53 PM
Greg
external usenet poster
 
Posts: n/a
Default click on check box to add an entry date

Thanks John

thats what i was doing wrong

all the best

Greg
"John Vinson" wrote in message
news
On Tue, 1 Jun 2004 17:08:14 +0100, "Greg" wrote:

That works fine except when I check the check box on the next record it
globally changes the time and date to all the records to present time and
date what I want to do is when I check( tick) the checkbox it stores the
current time and date for that particular record and when I got another
record it stores the current time and date.


It sounds like your date/time textbox is unbound, i.e. it's not being
stored in any table record. If you don't store the date/time field in
the table then you CAN'T do what you ask!

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public


 




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 03:34 PM.


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