form field not accepting date

gguy

Registered User.
Local time
Today, 00:33
Joined
Jun 27, 2002
Messages
104
In the on current event of a form I want to set a field on the form to the current date.

The code is simple [startdate]=date

Putting =date() in the control source works but I want to use this field in an if or case statement.

I just tried adding this statement in the on current event of another form and the date appear in the startdate field on that form.

Could it be that my form is corrupt or is there a setting I need to adjust.......thanks for any help! GGuy
 
gguy, I'm not sure what it is that you are trying to do.

If you want to add the code to the On Current Event, then it is -

me![StartDate] = Date()

If there is something else you are wanting to do, you will need to explain further.
 
Swing and a miss Peter.

I am trying to show a start date on the form and in the table. When you open the form for a given invoice # and no value is found in the [startdate] field on the table then I want todays date. The if statement to find an existing [startdate] works fine.

I had already tried me!Date(). The parens behind date drop as soon as I move to the next line. Nothing else on this form seems wack but this is strang because I can add an unbound field to other forms in the same database and set them equal to date. Actually, that is the solution I am currently using. I pull the date from a form that is still up behind the current invoice form.
 

Users who are viewing this thread

Back
Top Bottom