Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Handling

Status
Not open for further replies.

fredk

Technical User
Jul 26, 2001
708
US
If I want to check to make sure a date is in my startdate field (on my form) before I run my event....

I am trying:

If Me.startdate = "" Or Me.startdate Is Null Then....

I am getting an "run time 424 - object required" error.

If anyone can point me in the right direction, I would really appreciate it!!

Thank you!!!!

Fred
 
Fred,

When you refer to controls on a form use ! instead of . The . works most of the time, but is supposed to refer to properties, not members of collections.

Also, is this code in the form or in a module? If it's in a standard module it won't work because you're using "me". [Now take a moment to thank me for not making bad jokes about feeling used.]

Also, I think you should should be using IsNull(me!StartDate) instead of the construction you've got. I think the one with the spaces is OK for SQL but not for VBA. This, actually, is probably the source of your problem, not the others. I think.

Jeremy =============
Jeremy Wallace
AlphaBet City Dataworks

Take a look at the Developers' section of the site for some helpful fundamentals.
 
Perfect- your suggestion works - and thanks for sparing me! :) - The event is on the form so I am ok -

As always, I appreciate your help!!!

fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top