query to be exeucuted..

  • Thread starter Thread starter sweetummy
  • Start date Start date
S

sweetummy

Hi

I have a parameter query.. by city name..
i want to display according to the city and its population by year..

So i would like to display the city names in list box and the dates
availble ..

this both parameters should be passed into my desired query and the
data should be displayed according to the selection by the user by
clicking the command button..

plz.. help.........
 
Create a query. In the query wizard under the city and year columns, in the
where clause type [Enter City], [Enter Year] respectively. Link the query to
your report.

When the report runs it will prompt [Enter City] and [Enter Year] and your
report will be city, year specific.

The command button will be the report.
 
You could also create a form. On the form put two comboboxes. Populate one
with the city data (citycmb) and one with the year data (yrcmb). citycmb can
be populated with a select distinct city query and yrcmb with a select
distinct year query.

Place a button on the form. On the onclick event code a select statement
use the citycmb and yrcmb variables. Use DoCmd.RunSQL. The access help has
good documentation in this area.
J said:
Create a query. In the query wizard under the city and year columns, in the
where clause type [Enter City], [Enter Year] respectively. Link the query to
your report.

When the report runs it will prompt [Enter City] and [Enter Year] and your
report will be city, year specific.

The command button will be the report.



sweetummy said:
Hi

I have a parameter query.. by city name..
i want to display according to the city and its population by year..

So i would like to display the city names in list box and the dates
availble ..

this both parameters should be passed into my desired query and the
data should be displayed according to the selection by the user by
clicking the command button..

plz.. help.........
 
Yeah.. Thank you for your reply first..

[enter the city] is a very good parameter but user has to check which
city is included in our database.. (1 pitfall)

2nd reply is ok..i have to check it once.. i'm not good at combo boxes
creation.. i will go for help..
 
Back
Top