Dumb question about time

vagelisr

Registered User.
Local time
Today, 18:50
Joined
Apr 28, 2011
Messages
87
Hi to all

I have 4 fields.
Date_From
Time_From
Date_To
Time_To
All the field is date/time

When i use the code Time_from = Format(Now(), "h:m") in form load to take the current time i receive a run-time error.

Why??
 
First of all thanks for your answer but......
The problem is not in the syntax.
If yoy give the command Format(Now(), "h:m") in a text field work correct.
The problem is in the field and this is what i dont understand!!!!!!!
 
I tried to recreate your issue.

I put an unbound text box on a form. In the on load event for the form, I used:
Code:
me.text10 = format(Now(),"h:m")

Each time I load the form, the current system time appears.

I wonder if you form or db may be corrupted. Try running a compact and repair and see if that helps.

Does the above describe what you did, or something else?

Alan
 
I have to agree with Alan, it sounds like it might be corruption. Your original code works for me, using it to populate a Date/Time field.

What is the exact Error Message you're receiving?

Could you post your complete Form_Load code?

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom