T
TC
There might be many tables in your database. If you could use recordcount
the way you have tried to, how would VBA know which table you meant?
Anyway, RecordCount is a property of the Recordset object. It is not a
function that returns a value.
Try something like this:
TextLabel2.aption = DCount("*", "MyTable")
(replace MyTable with the name of your table)
There are more efficient ways to get the record count of a table, but that
should get you started.
Also, read-up more on "objects", "methods" and "properties". Those are the
backbone of VBA. Your suggested code, shows that you don't quite understand
those concepts, yet!
HTH,
TC
the way you have tried to, how would VBA know which table you meant?
Anyway, RecordCount is a property of the Recordset object. It is not a
function that returns a value.
Try something like this:
TextLabel2.aption = DCount("*", "MyTable")
(replace MyTable with the name of your table)
There are more efficient ways to get the record count of a table, but that
should get you started.
Also, read-up more on "objects", "methods" and "properties". Those are the
backbone of VBA. Your suggested code, shows that you don't quite understand
those concepts, yet!
HTH,
TC