Empty Table

  • Thread starter Thread starter Gordon Dale
  • Start date Start date
G

Gordon Dale

Im have written a macro which takes the result from a
ComboBox selection and does a Make-Table from the dataset
of another table where the Supplier = the ComboBox
selection..

Works fine but for one thing, if the table is empty i.e.
no results returned the table still opens. This wastes
time and anoys the user.

I would like to know of a way to check the table for
empty i.e. If Supplier.table="" or use and index in some
way. Perhaps a short self-closing message informoing "No
match found" etc.

Thanks in anticipation

Regards
 
Gordon said:
Im have written a macro which takes the result from a
ComboBox selection and does a Make-Table from the dataset
of another table where the Supplier = the ComboBox
selection..

Works fine but for one thing, if the table is empty i.e.
no results returned the table still opens. This wastes
time and anoys the user.

I would like to know of a way to check the table for
empty i.e. If Supplier.table="" or use and index in some
way. Perhaps a short self-closing message informoing "No
match found" etc.


You can check if the table has any relevant records by using
DCount with the same criteria as you use in the make table
query. I don't use macros so I won't presume to offer
details, but maybe you can use Help for any any addditional
information you might need.
 
Worked a treat, thanks Marsh

Regards

Gordon
-----Original Message-----



You can check if the table has any relevant records by using
DCount with the same criteria as you use in the make table
query. I don't use macros so I won't presume to offer
details, but maybe you can use Help for any any addditional
information you might need.
 
Back
Top