Query answered by drop-drown ?

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

Guest

Hi,

I have a report that prints out a single detailed record of on-job
accidents. Right now the data comes from a query I have that has the
following expression in the criteria box for a field called "Accident
Number": [Accident Number to look up?]

When I run the report a little box pops up in the middle of the screen and I
fill in the box with the number and it prints the report. Now, how can I set
up the query so that instead of a question box I need to fill in, the report
query will bring up drop-down box with a list of all availble report numbers
(along with the related Accident Date field) that I can just scroll down and
click to get the report? This will save me the trouble of having the know the
exact Accident Number before printing the report.

Thanks,
David
 
David,

probably the easiest way is to create a small <unbound> form with either a
listbox or combobox from which you select the accident number as the
criteria for your query. So in the "Criteria" for Accident Number in the
query grid, type Forms!<YourCriteriaForm>!<NameOfControl>

HTH,
Brian
 
Thanks Duane,

I worked like a dream!

David

Duane Hookom said:
Don't use parameter prompts. Check this link for how to use a control on a
form to set your criteria http://www.fontstuff.com/access/acctut08.htm.

--
Duane Hookom
MS Access MVP
--

Yeahyeahyeah said:
Hi,

I have a report that prints out a single detailed record of on-job
accidents. Right now the data comes from a query I have that has the
following expression in the criteria box for a field called "Accident
Number": [Accident Number to look up?]

When I run the report a little box pops up in the middle of the screen and
I
fill in the box with the number and it prints the report. Now, how can I
set
up the query so that instead of a question box I need to fill in, the
report
query will bring up drop-down box with a list of all availble report
numbers
(along with the related Accident Date field) that I can just scroll down
and
click to get the report? This will save me the trouble of having the know
the
exact Accident Number before printing the report.

Thanks,
David
 
Hi Duane,

I used the process you suggested and it worked. I push the button and I get
the query to return the data I need in datasheet form. Now I need to go to
the next step...

I've designed a form that gets filled in by the data in the query so
additional data can get added. How do I adjust my dialog box so that when I
hit the "OK" button rather than getting the data in datasheet format I get
the form with the data from the query filled in?

Thanks,
David

Duane Hookom said:
Don't use parameter prompts. Check this link for how to use a control on a
form to set your criteria http://www.fontstuff.com/access/acctut08.htm.

--
Duane Hookom
MS Access MVP
--

Yeahyeahyeah said:
Hi,

I have a report that prints out a single detailed record of on-job
accidents. Right now the data comes from a query I have that has the
following expression in the criteria box for a field called "Accident
Number": [Accident Number to look up?]

When I run the report a little box pops up in the middle of the screen and
I
fill in the box with the number and it prints the report. Now, how can I
set
up the query so that instead of a question box I need to fill in, the
report
query will bring up drop-down box with a list of all availble report
numbers
(along with the related Accident Date field) that I can just scroll down
and
click to get the report? This will save me the trouble of having the know
the
exact Accident Number before printing the report.

Thanks,
David
 
I'm not sure what you have done but I believe you can just create a form
based on your query.

--
Duane Hookom
MS Access MVP


Yeahyeahyeah said:
Hi Duane,

I used the process you suggested and it worked. I push the button and I
get
the query to return the data I need in datasheet form. Now I need to go to
the next step...

I've designed a form that gets filled in by the data in the query so
additional data can get added. How do I adjust my dialog box so that when
I
hit the "OK" button rather than getting the data in datasheet format I get
the form with the data from the query filled in?

Thanks,
David

Duane Hookom said:
Don't use parameter prompts. Check this link for how to use a control on
a
form to set your criteria http://www.fontstuff.com/access/acctut08.htm.

--
Duane Hookom
MS Access MVP
--

Yeahyeahyeah said:
Hi,

I have a report that prints out a single detailed record of on-job
accidents. Right now the data comes from a query I have that has the
following expression in the criteria box for a field called "Accident
Number": [Accident Number to look up?]

When I run the report a little box pops up in the middle of the screen
and
I
fill in the box with the number and it prints the report. Now, how can
I
set
up the query so that instead of a question box I need to fill in, the
report
query will bring up drop-down box with a list of all availble report
numbers
(along with the related Accident Date field) that I can just scroll
down
and
click to get the report? This will save me the trouble of having the
know
the
exact Accident Number before printing the report.

Thanks,
David
 
Back
Top