Count the Number of Records

  • Thread starter Thread starter RobVT
  • Start date Start date
R

RobVT

Using MS Access 2003.
I can't imagine I'm the first to dream this up, but I can't find much
support on it either. I have a couple queries which are supplied by a
couple of forms. The first form asks the user to input project
information (project type, location, etc.). Once input, the user hits
the "Next" button and goes on to the second form, which varies based on
the user's selection in the "Project Type" combo box. Once in the
second form, the user is asked to supply lower-level project
characteristics that vary based on which project type we're working
with.
What I'd like to do is place a small textbox on the second page that
will show the user how many records or projects match the query
criteria laid out by the user on the first form. This will tell the
user whether they should return to the first form and remove some
search criteria, or go on to limit the results further by inputting the
lower-level project characteristics.
Also, if the user decided to go on from the second form and no projects
match the criteria, I'd like to have an error message that asks the
user to go back and remove some search criteria.
Can anyone help with these requests? Any assistance is much
appreciated and thanks in advance!!!
 
How about creating a microsubform? Turn off all the bells whistles
buttons and bars, size it to a single text box area, and base it on a
sum query using the criteria from the form, with nothing but COUNT on
one field? This will give you one textbox with a count of the number of
records in it. I am sure there is a more elegant way to do this, but
this has worked for me.
 
Phil, Thanks for the suggestion. I actually found a way to count the
number of records and place the total in a text box on the following
form. I'm actually exploring options now to create a message box that
informs the user how many records were found and asks whether they want
to go on, or go back. Thanks for your help!
 
Back
Top