Parameter field in Reports

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

Guest

Hi There. I have set up a query with a parameter field to print labels (full
page of the one). As the first and last name are in different fields, the
last name field appears then the first name SEPARATELY. is there any way a
paramater field can be a drop down box where the name is selected from a list
(it would need to show last name, fist name, middle name)... or is this
getting a bit complicated for a beginner? Thanks Len
 
You cannot get a query to give you a combo box.

But if you set up a form, you can refer to the combo boxes on the form
instead of popping up parameter boxes.

I'm assuming you have a table of clients (named tblClient) with these
fields:
ClientID AutoNumber primary key
FirstName Text
Surname Text
You also have a form named (say) Form1, and it has a combo named Combo1
which has a RowSource of:
SELECT ClientID, Surname & ", " & FirstName FROM tblClient ORDER BY
Surname, FirstName;

Now in query design, in the Criteria row under the ClientID field, you can
enter:
[Forms].[Form1][Combo1]

The report based on that query will then contain only the record for the
person chosen in the combo.

If you already have a form set up that could show the record for the person,
here's another approach:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html
 
Thanks Allen. Will check it out. Greatly appreciate your help.

Regards

Len

Allen Browne said:
You cannot get a query to give you a combo box.

But if you set up a form, you can refer to the combo boxes on the form
instead of popping up parameter boxes.

I'm assuming you have a table of clients (named tblClient) with these
fields:
ClientID AutoNumber primary key
FirstName Text
Surname Text
You also have a form named (say) Form1, and it has a combo named Combo1
which has a RowSource of:
SELECT ClientID, Surname & ", " & FirstName FROM tblClient ORDER BY
Surname, FirstName;

Now in query design, in the Criteria row under the ClientID field, you can
enter:
[Forms].[Form1][Combo1]

The report based on that query will then contain only the record for the
person chosen in the combo.

If you already have a form set up that could show the record for the person,
here's another approach:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

len said:
Hi There. I have set up a query with a parameter field to print labels
(full
page of the one). As the first and last name are in different fields, the
last name field appears then the first name SEPARATELY. is there any way
a
paramater field can be a drop down box where the name is selected from a
list
(it would need to show last name, fist name, middle name)... or is this
getting a bit complicated for a beginner? Thanks Len
 
Back
Top