R
Rob S.
Access 2002 - I'm generating a date to add a few new records automatically
On one form new code
Dim vTransDate As Date
vTransDate = DateSerial(Year(Now()), Month(Now()), 1)
the DateSerial function generates Run-time error 13: Type mismatch
but on another form old code
Dim vTodaysDate As Date
vTodaysDate = DateSerial(Year(Now()), Month(Now()), Day(Now()))
works fine
knowledge base article said to select the MS DAO 3.6 object library, which I
did, without really knowing what I'm doing. No change. Article also said to
create a new database first, but I need this to work in the old database.
Any fix tried, or maybe there is a better way to get a date declared. Thank
you.
On one form new code
Dim vTransDate As Date
vTransDate = DateSerial(Year(Now()), Month(Now()), 1)
the DateSerial function generates Run-time error 13: Type mismatch
but on another form old code
Dim vTodaysDate As Date
vTodaysDate = DateSerial(Year(Now()), Month(Now()), Day(Now()))
works fine
knowledge base article said to select the MS DAO 3.6 object library, which I
did, without really knowing what I'm doing. No change. Article also said to
create a new database first, but I need this to work in the old database.
Any fix tried, or maybe there is a better way to get a date declared. Thank
you.