if.. table is empty then...

voskouee

Registered User.
Local time
Today, 10:42
Joined
Jan 23, 2007
Messages
96
I want to write a line that will check a table. if that table is empty i want to execute the following line

DoCmd.CopyObject , RDebit, acTable, "Generic"

i open the recordset like this....

Set RsDebit = CurrentDb.OpenRecordset("SELECT SOBP FROM RFGDebitNotes;")

RDebit = RsDebit!SOBP & "DebitN"


thanks guys in advance...
 
Try:
If RsDebit.RecordCount = 0 then
......your code here.
End If
 

Users who are viewing this thread

Back
Top Bottom