Prompt for multiple criteria?

  • Thread starter Thread starter Carla Bradley
  • Start date Start date
C

Carla Bradley

I have a client with an Access Database (Access 2002) and
basically he is wanting to prompt for multiple criteria
from the same field. For example, he has a table that has
a field called 'home center'. This field contains numbers
like 100, 130, 180, 220, 240 and so on. He wants to
create a report that would prompt him to enter a certain
manager's home centers. So Mgr A might need to enter 100,
180 and 220, but Mgr B might need 130, 180 and 240. He
would like this report to show the data for all their
home centeres, but he doesn't want to have to write 20
different reports. This seems simple enough, but we've
both searched on tons of different keywords and come up
blank.

Thanks!
Carla Bradley
 
Here's a thought. Create a table of home centers for each
manager. Link this table into your query, and use Mgr as
the parameter, instead of homce center.
 
Another way to do this:
Assign the parameter as a parameter to a user defined
function. The function will parse the user input and
translates it to an "OR" condition. Like:

ParseCenters([Enter home centers separated by or, like,
120 or 135 or 145])

then write code in ParseCenters function to return the
centers as appropriate. Like:
"120" or "135" or "145"

If they are numbers, then just verify the validity of the
user input and return it as is. Like:
120 or 135 or 145

hth.
 
Back
Top