Date () not working

  • Thread starter Thread starter SL Allen
  • Start date Start date
S

SL Allen

I am using Access 2002 Sp3 and I am having a problem using =date().

I have a form with a check box "AddToRpt" that when checked it puts the
current date in a text box "DateAddToRpt" . On the click of the check box I
have the code of

Private Sub AddToRpt_Click()
Me.DateAddToRpt = Date

End Sub

Problem is it will not keep the () after date and it thinks I am looking for
a field named "Date" ?? I have checked References and none seem to be
missing. If I use =Now() it will work but I do not want the time stamp.

Any help is greatly appreciated
 
I am using Access 2002 Sp3 and I am having a problem using =date().

I have a form with a check box "AddToRpt" that when checked it puts the
current date in a text box "DateAddToRpt" . On the click of the check box I
have the code of

Private Sub AddToRpt_Click()
Me.DateAddToRpt = Date

End Sub

Problem is it will not keep the () after date and it thinks I am looking for
a field named "Date" ?? I have checked References and none seem to be
missing. If I use =Now() it will work but I do not want the time stamp.

Any help is greatly appreciated

In Access you need to use = Date()
In VBA (when writing code) you use = Date
That's why the code is dropping the (). It's not needed.

You are having a reference problem, even though none are apparently
marked Missing.

For all that you'll need to know, look here:
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 
Thanks Fred, I did have a field in a table called "Date" but I changed it,
or so I thought. Guess it is time to go back over it

Thanks again

in message ...
 
Back
Top