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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|