Link to home
Start Free TrialLog in
Avatar of SowleMan
SowleManFlag for United States of America

asked on

Access 2010

I am using Access 2010 with VBA.  I have a simple form that uses a query (based on a table) as the record source.  Using VBA, how can I determine if the query successfully found records?  How many records?  I would like to use the form's Open_Event to determine if the query was successful and there are records available for the form to process. If not, I will display a message indicating no records were found and CANCEL=TRUE and exit the OPEN_EVENT.
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SowleMan

ASKER

Thank you Cactus_Data and MicroShadow -

Both answers give me a solution. I liked MicroShadow's answer a little better because it was easier for me to implement.

SowleMan
> ..  it was easier for me to implement.

? - so four lines of code is hard?

You should always go for the fastest working method.

/gustav