Time Calculation.

LEXCERM

Registered User.
Local time
Today, 18:30
Joined
Apr 12, 2004
Messages
169
Hi All,

FORM1, in the attached DB, is used to calculate hours between two times.

The two issues I have are:

1) In the RESULT (HRS/MIN) field, how can I get the value to appear as HH:MM?

2) In the date picker fields, how can I set the value of the field to the current date when opening the db? I have tried setting the control source to DATE() but, in doing so, it won't allow me to change the date thereafter. There is also a VALUE property in this field, but it seems to only allow you to enter a specific date.

Regards.
 

Attachments

i did not have time to view your attached db, but these are some possible solutions:

1) Format ([fieldname], "hh:mm")

2) Put Date() in the default value property of your field
 

Attachments

Thanks Ashfaque for the coding. It works well.

The only other problem is with the date picker. If you set the CONTROL SOURCE property to NOW() and then then try and choose a different date, it won't allow you to. There is also a VALUE field property, but it only allows you to enter a specific date.

Regards,
PAUL.
 
Ashfaque,

I had to change NOW() to CDATE(Date), but the form works fine now.

Thanks for all your help.

Regards,
PAUL.
 

Users who are viewing this thread

Back
Top Bottom