G
Guest
Hi I have a simple issue that I can't seem to solve; How can I tell through
VBA code if a table has NO records in it. I need this as validation for
counting records in a table.
Typically to count number of records in a table I using VBA I use the
following:
wtih rst
..movefirst
..movelast
intValue = .RecordCount
end with
But if the table has no records in it(which is somtimes the case) you will
get a "No current record,,,,,, 3021 Error" as soon as the .movefirst occurs.
If anyone could please let me know how to pre test the table in VBA so that
I can tell if the table is empty before doing the count it would be great.
Thanks in advance.
James D.
VBA code if a table has NO records in it. I need this as validation for
counting records in a table.
Typically to count number of records in a table I using VBA I use the
following:
wtih rst
..movefirst
..movelast
intValue = .RecordCount
end with
But if the table has no records in it(which is somtimes the case) you will
get a "No current record,,,,,, 3021 Error" as soon as the .movefirst occurs.
If anyone could please let me know how to pre test the table in VBA so that
I can tell if the table is empty before doing the count it would be great.
Thanks in advance.
James D.