Setting Parameter Names

J

JulieC

I have a query that asks the user to input a parameter value. I want to find a way to change the parameter name, so it is more user friendly, ie. the user can tell what is being asked.

My query language is:

SELECT [Bill Summary].[Bill Type], [Bill Summary].[Bill Number], [Bill Summary].Hyperlink, [Bill Summary].Sponsor, [Bill Summary].Summary, [Bill Summary].Analysis, [Bill Summary].Background, [Bill Status].Status, [Bill Status].[Effective Date], [Bill Status].Citation, [Review Comments].[Effect on CCWRD/BBWD], [Review Comments].[Financial Impact on CCWRD/BBWD]
FROM ([Bill Summary] LEFT JOIN [Review Comments] ON [Bill Summary].[Bill Number]=[Review Comments].[Bill Number]) LEFT JOIN [Bill Status] ON [Bill Summary].[Bill Number]=[Bill Status].[Bill Number]
WHERE ((([Bill Summary].[Bill Type])=forms!Bill_Summary!txtBill_Type)) and ((([Bill Summary].[Bill Number])=forms!Bill_Summary!txtBill_Number));

When running the query, a enter parameter value box comes up and the box says Forms!Bill_Summary!txtBill_Type or txtBill_Number. How can I get it to say Enter SB or AB and Enter Bill Number?
 
K

Ken Snell

The parameter syntax that you have right now means that the query is looking
for the values on a form named "Bill_Summary" -- specifically in controls
named "txtBill_Type" and "txtBill_Number" on that form.

If you want to just use the parameter box and not use a form, replace the
references to
forms!Bill_Summary!txtBill_Type
and
forms!Bill_Summary!txtBill_Number

with words inside [ ] characters:
[Enter the bill type:]
and
[Enter the bill number:]


--

Ken Snell
<MS ACCESS MVP>

JulieC said:
I have a query that asks the user to input a parameter value. I want to
find a way to change the parameter name, so it is more user friendly, ie.
the user can tell what is being asked.
My query language is:

SELECT [Bill Summary].[Bill Type], [Bill Summary].[Bill Number], [Bill
Summary].Hyperlink, [Bill Summary].Sponsor, [Bill Summary].Summary, [Bill
Summary].Analysis, [Bill Summary].Background, [Bill Status].Status, [Bill
Status].[Effective Date], [Bill Status].Citation, [Review Comments].[Effect
on CCWRD/BBWD], [Review Comments].[Financial Impact on CCWRD/BBWD]
FROM ([Bill Summary] LEFT JOIN [Review Comments] ON [Bill Summary].[Bill
Number]=[Review Comments].[Bill Number]) LEFT JOIN [Bill Status] ON [Bill
Summary].[Bill Number]=[Bill Status].[Bill Number]
WHERE ((([Bill Summary].[Bill Type])=forms!Bill_Summary!txtBill_Type)) and
((([Bill Summary].[Bill Number])=forms!Bill_Summary!txtBill_Number));
When running the query, a enter parameter value box comes up and the box
says Forms!Bill_Summary!txtBill_Type or txtBill_Number. How can I get it
to say Enter SB or AB and Enter Bill Number?
 
J

JulieC

Simple Fix. Thank you.

Ken Snell said:
The parameter syntax that you have right now means that the query is looking
for the values on a form named "Bill_Summary" -- specifically in controls
named "txtBill_Type" and "txtBill_Number" on that form.

If you want to just use the parameter box and not use a form, replace the
references to
forms!Bill_Summary!txtBill_Type
and
forms!Bill_Summary!txtBill_Number

with words inside [ ] characters:
[Enter the bill type:]
and
[Enter the bill number:]


--

Ken Snell
<MS ACCESS MVP>

JulieC said:
I have a query that asks the user to input a parameter value. I want to
find a way to change the parameter name, so it is more user friendly, ie.
the user can tell what is being asked.
My query language is:

SELECT [Bill Summary].[Bill Type], [Bill Summary].[Bill Number], [Bill
Summary].Hyperlink, [Bill Summary].Sponsor, [Bill Summary].Summary, [Bill
Summary].Analysis, [Bill Summary].Background, [Bill Status].Status, [Bill
Status].[Effective Date], [Bill Status].Citation, [Review Comments].[Effect
on CCWRD/BBWD], [Review Comments].[Financial Impact on CCWRD/BBWD]
FROM ([Bill Summary] LEFT JOIN [Review Comments] ON [Bill Summary].[Bill
Number]=[Review Comments].[Bill Number]) LEFT JOIN [Bill Status] ON [Bill
Summary].[Bill Number]=[Bill Status].[Bill Number]
WHERE ((([Bill Summary].[Bill Type])=forms!Bill_Summary!txtBill_Type)) and
((([Bill Summary].[Bill Number])=forms!Bill_Summary!txtBill_Number));
When running the query, a enter parameter value box comes up and the box
says Forms!Bill_Summary!txtBill_Type or txtBill_Number. How can I get it
to say Enter SB or AB and Enter Bill Number?
 
Top