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

[94] Invalid use of null

Status
Not open for further replies.

JohnSteven

Technical User
Oct 30, 2002
27
I'm using a small calendar in a subform with the following to call it up:
Code:
Private Sub Date_Click()
    DoCmd.OpenForm "frmCalendar", , , , , acDialog
End Sub

The problem I'm having is when I click on it I get an error as follows:

[94] Invalid use of null

Any ideas as to why this is happening?

The calendar works fine when used in a Form , just won't work as Subform.

Please Post back, so other can benefit too.

Later
JohnSteven

"The only stupid question is the one you don't ask"
 
Hi,

It looks like the error is coming from the actual calendar form itself, as there is nothing wrong with that line.

Have you tried debugging and stepping through the code to find out which line the error occurs on?

Dean.
 
Thank for the reply.

Actually, I used another calendar form I have that is known to work in subforms of other DB's I created. I will step through the code and see where the snafu is.........

Please Post back, so other can benefit too.

Later
JohnSteven

"The only stupid question is the one you don't ask"
 
Just as an aside, your problem is rooted in the fact that somewhere, an assignment of NULL is being made to a DATE object, and that's a no-no. Access (rightly or wrongly) will NOT ALLOW a null date assignment.

Dim x as date
x = Null

will fail every time. So somewhere, you have a NULL value that's trying to be put into a DATE type object....


Jim





Don't be sexist - Broads hate that.
Another free Access forum:
More Access help stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top