Avatar of SowleMan
SowleMan
Flag 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.
Microsoft DevelopmentMicrosoft Access

Avatar of undefined
Last Comment
Gustav Brock

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Joe Howard

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Gustav Brock

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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
Gustav Brock

> ..  it was easier for me to implement.

? - so four lines of code is hard?

You should always go for the fastest working method.

/gustav
Your help has saved me hundreds of hours of internet surfing.
fblack61