date/time problem

bone head

Registered User.
Local time
Today, 22:24
Joined
Feb 11, 2002
Messages
73
Help I seem to be brain dead today


I have a form with a field whichautomaticly enters the date of the record being raised “now() “ I also have another field as drop down box to indicate approval “approved”

It has now been decided that we wish to measure the time between the two, sounds simple but then this is Bonehead doing it. If I create a date field obviously if I put now() in it, it only shows the date the record was raised.

I need therefore somehow to link this to show the date that field “ approved” was marked as approved.

I am sure this is quite simple, but I can not seem to get my head around it today.

Any help greatly received
 
Have another textbox that's hidden on your form.

And in the AfterUpdate of your combobox, assign the Now() to the hidden textbox: that way you can calculate the difference in time.
 
Many thanks

I do not fully understand your answer ( my fault )

I have a hidden field date2 which I had set default value to now() this as I said is showing the date the record was raised, I think therefore what I need to do is in the field approved properties set on update to somehow change the value of date2 to the current date.

Am I beginning to understand, and does anyone have the code to put in the event procedure.

I am not sure about the textbox bit of your answer.

Many thanks
 
You got the idea.

The only code you'll need to put in is this:

txtApproved = Now()

where txtApproved is the name of your second hidden textbox.
 
Many thanks

Still not sure about the hidden text field, can you use these in later calculations? would welcome more info.

Ie we will need to calculate say the number of days betwenn date1 and date2

Anyway inserted the code into the dropdown box to reset date2 feild and it works fine.

Once again cheers
 
If you bind the second textbox to your table then you'll have both dates, and you can use it to calculate.

Can't put more info at the moment; pushed for time in work - just pop in here to get a break from the boring stuff.
 

Users who are viewing this thread

Back
Top Bottom