xena_morph
03-21-2002, 04:01 PM
hi
im wanting to go from form a to form b with form b showing both the time and date as well as options to go to other forms,
- so basivcally how do i get just the time and date to show up
please help
xena_morph
03-21-2002, 04:08 PM
just figured if i do a text box with the default value Date() i getthe date - but how the time, i may just do a seperate text box with Time()- just checked it does work
thansk
anyway
-is there anyway of deleting a posting when sent
xena_morph
03-21-2002, 04:09 PM
problem is of course that the info is not current just the time and date the form was entered hhmmmmm
PMrider
03-21-2002, 05:34 PM
How about Now() which will show the date and time together
xena_morph
04-02-2002, 04:03 PM
this works but the time doesnt change it stays the same as when the form was first opened and i really need it to be in realtime, any ideas?
edtab
04-02-2002, 04:23 PM
You'll have to requery your text box where your time resides.
To do this, you have to place a an Event Procedure (ie. code)in the "On Timer" property of your form.
Your code should be:
Me.timer.requery
(assuming your text box's name is "timer")
You also have to set the interval property of your form to something like 1000 (this represents 1 second interval, I believe). The higher the number, the slower the change in the time display would be.
edtab
xena_morph
04-03-2002, 02:29 PM
ive done the coding and changed the interval to 1000 but it still doesnt work.
i had to put the coding on the 'on change' event as i couldnt see the 'on timer' event
xena_morph
04-03-2002, 02:30 PM
aha ive just found the ontimer event and put the coding in with the interval of 1000 but it dont work!
boblarson
04-03-2002, 03:10 PM
On each form that you want to have the date/time show up, put this code into the OnTimer event of that form (set the timer interval to 1000):
Me.Caption = Now()
Each time the timer fires (every 1 second - 1000 milliseconds) the time will change. I use it frequently. Don't "requery" anything. Use the above stuff and it will work.
BL
hth
Oops, I forgot to tell you that you can use it like this as well:
For all of these examples put the code in the form's OnTimer event with interval set at 1000.
To display in a text box:
Me.txtMyTextBoxName.Value = Now()
To display with a label:
Me.lblMyLabelName.Caption = Now()
[This message has been edited by boblarson (edited 04-03-2002).]