limit with criteria

M

Mary

I am creating a database for one of the workers who is not computer savvy, so
the database must not need behind the scenes alterations, it has to be up
front and easy for her to use. I have created a form that allows her to
search information about members, but I am stuck on a point.

She needs to search and produce reports, labels, etc., by "current,"
"former," or by "all." Instead of creating three full sets of queries and
reports which are limited by this category, is there a way that I can have
one set and have them filter using a checkbox or drop down combo box to
return the type of member she needs?

Thanks ahead of time.
 
A

Al Campagna

Mary,
You could create a report that delivers "all" members.
When you want to restrict that recordset, use the Where argument
of the OpenReport method to criteria and filter the records returned.

You didn't indicate what constitutes "current" and what constitutes
"former" etc... So for example...

If you had a text Status field... your Where argumnent could be...
DoCmd.OpenReport "rptName", acViewPreview, , "Status = 'Former' "

Or if you got "Former" from a combo...
DoCmd.OpenReport "rptName", acViewPreview, , "Status = ' " & cboStatus & " '
"
(I inserted spaces between the quote marks for clarity... remove from
real code)

And, of course... don't use any Where if you want All members.
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top