VBA help

C

Chace

I am getting an error at runtime that says 'Run-time error 424: Object
required' for the following line of code.

If rsDyna![Date] Is Null Then

Any ideas why?

Thanks,
Chace
 
P

PC Datasheet

Did you dim rsDyna As DAO.Recordset?
Change the name of the Date field. Date is a reserved word and should not be
used as a name of a field!
 
M

Marshall Barton

Chace said:
I am getting an error at runtime that says 'Run-time error 424: Object
required' for the following line of code.

If rsDyna![Date] Is Null Then


Is Null is not a alid operator in VBA, only in SQL and
control source expressions.

Use the IsNull(rsDyna![Date]) function instead.
 
C

Chace

Thanks, that solved the problem.

Marshall Barton said:
Chace said:
I am getting an error at runtime that says 'Run-time error 424: Object
required' for the following line of code.

If rsDyna![Date] Is Null Then


Is Null is not a alid operator in VBA, only in SQL and
control source expressions.

Use the IsNull(rsDyna![Date]) function instead.
 
N

Norwedsh

Were you referring to the way IsNull() was used? I use IsNull to trap null
value returns or null errors. I guess my question is what makes it invalid

Marshall Barton said:
Chace said:
I am getting an error at runtime that says 'Run-time error 424: Object
required' for the following line of code.

If rsDyna![Date] Is Null Then


Is Null is not a alid operator in VBA, only in SQL and
control source expressions.

Use the IsNull(rsDyna![Date]) function instead.
 
Top