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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Variable in Access Form

Status
Not open for further replies.

HMeister

Technical User
Oct 5, 2005
2
US
I'm trying to insert the value from a form object into an Access table. In my sub, after first declaring the variable and then setting the variable to Forms!Formname!objectname, when the value is null, it causes an error. As a workaround, I placed the variable declaration inside a conditional statement, and this works for the data types except datetime and Boolean. Regardless of whether or not the variable is declared inside the conditional statement, the datatime gets set to 12:00 am and Boolean to false at runtime. I'd appreciate any suggestions you can offer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top