form help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

in my database, i have this form where the user chooses a data range and it
will export data from my server. the data has an important field "loc". Right
now, it picks up all location for that date.
Was just told that now they want to have the ability not only choose the
date but to choose which location they want to pick. Now my company has 35
different location, and if they just picked 1 loc per day, fine, i can do
something, but sometimes, they want to pick 2, another time 3, other times ,
all 35. I would like to know how i can build that for them.
Also, right now, the database will tell teh user that if they try to choose
a date range taht was previously picked, warning screen will appear. now, i
need the same thing but to also include the location and hte warning screen
should say, if they pick a date and location that was already ran, that this
date adn these loc has been ran before.
Please help
 
Justin, you will need to be comfortable with VBA to achieve what you want
here.

You could create a form with a multi-select list box so the user can select
multiple locations, a pair of text boxes for the limiting dates, and a
command button to open the report limited to whichever location(s) and dates
the user selected.

Use the example code in these 2 articles:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html
and:
Use a multi-select list box to filter a report
at:
http://allenbrowne.com/ser-50.html
Both articles generate a string (strWhere) to use in WhereCondition of
OpenReport. You will need to combine them.
 
Back
Top