M
mattc66 via AccessMonster.com
I need to check my RecordSet if it contains no records I want it to stop. I
created the below IF statement. However it when I run it, it stops on the IF
and I get the message "No Current Record".
What is the proper syntax for checking the RecordSet?
Dim db As DAO.Database
Dim rs1 As DAO.Recordset
Set db = CurrentDb()
Set rs1 = db.OpenRecordset("qryOrderEDI")
If rs1![CustID] = Null Then
MsgBox "There are no EDI Records to Upload.", vbOK
Set rs1 = Nothing
DoCmd.Close
Else
created the below IF statement. However it when I run it, it stops on the IF
and I get the message "No Current Record".
What is the proper syntax for checking the RecordSet?
Dim db As DAO.Database
Dim rs1 As DAO.Recordset
Set db = CurrentDb()
Set rs1 = db.OpenRecordset("qryOrderEDI")
If rs1![CustID] = Null Then
MsgBox "There are no EDI Records to Upload.", vbOK
Set rs1 = Nothing
DoCmd.Close
Else