|
-
Jun 30th, 2005, 03:38 AM
#1
Thread Starter
Member
Invalid use of Null !
Hi All,
I am using following code in VBA to get some records (in my case it is a single record). On Message box line it shows "Invalid use of Null" error, How could I prevent this. Is there any method to know any record is there in recordset or not. As if no record is returned then I want to print "No Match".
***************CODE******************************
Set DB = CurrentDb()
'Get Total Actual Project time from TimeSheet
Actprj = "SELECT (Int(CSng(Sum([Duration])))*24)+Format(Sum([Duration]),'hh') & ' : ' & Format(Sum([Duration]),'nn') AS Expr1" _
& " FROM tbTimeSheet HAVING ((tbTimeSheet.PrjID)='" & Form_TmpInfoPrj.cmbPrj.Value & "')"
Set Rst = DB.OpenRecordset(Actprj)
msgbox Rst.Field(0).value
************************CODE***************************
Regards,
Alankar
The rest of mind is not in rest, It rests in rest. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|