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

IsNull Proper Use in CrossTab Query

Status
Not open for further replies.

samn265

Technical User
Feb 12, 2002
35
US
I have the following function (see below) that runs a cross tab query which produces 1 record. However, sometimes, the query has no records to produce. At that time I get run-time Error. I tried to use the IsNull function, to solve this problem, but I guess I am using it wrong. Would anyone tell me the correct format of using it in the following function:

Public Function TotalUnexcusedIncidents() As Integer
TotalUnexcusedIncidents = DLookup("[TotalUnExcused]", "qryCrosstab30DayIntervalTest1")
MsgBox "TOTAL UNEXCUSED: " & [TotalUnexcusedIncidents]
End Function


Thanks….. Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top