VBA help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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!
 
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.
 
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.
 
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.
 
Back
Top