Problem with function Date() in SQL in VB

R

Rafa³

I have this code:

DoCmd.RunSQL "UPDATE tmp SET tmp.DataZm = Date()"

But I got the error 3075:

"Function can not be used in query"

Can anybody help me?

Rafa³
 
K

Kevin K. Sullivan

How about

DoCmd.RunSQL "UPDATE tmp SET tmp.DataZm = #" & Date() & "#"

HTH,

Kevin
 
Top