query to be exeucuted..

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.........
 
J

J

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.
 
J

J

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.........
 
S

sweetummy

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..
 

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