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 424

Status
Not open for further replies.

Orcanut

Programmer
Sep 3, 2002
24
CA
In an on click event the following:
"If Forms![Guests]![Guests Subform].Form![CheckOutDate] Is Null Then" elicits a runtime error 424 message.

In the same procedure &quot;If Forms![Guests]![Guests Subform].Form![Amount Due].Value <> 0 Then&quot; runs properly.

Could anyone explain what is wrong with the first line.

Thanks.
 
Try this
if IsNull(Forms![Guests]![Guests Subform].Form![CheckOutDate]) Then Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need!
 
Thank you this works fine. Is the syntax **** Is null therefore wrong in all cases or when should I not use it?

 
I didn't Understand your question.Below is the explanation for Isnull function

'If CheckOutDate is null
if IsNull(Forms![Guests]![Guests Subform].Form![CheckOutDate]) Then
'Write a code to execute
end if
'If you want to check for Not null
if Not IsNull(Forms![Guests]![Guests Subform].Form![CheckOutDate]) Then
'Write a code to execute
end if

Hope I answered your question Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need!
 
The syntax
Code:
... Is Null
is a combination of two things:
Null is a special Variant Data type, but not an object.
the
Code:
Is
keyword says if two objects are the same. That is, the same instance.

I think that, due to Null propagation,
Code:
... Is Null
will never return
Code:
true
or
Code:
false
, but always
Code:
Null
.

Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top