How many fields are in the combo field source, mybe the system field is not
the first field so you actually filtering on a different value.
After selecting a value in the combo, open the immidiate window, copy the
reference to the combo and see what value you getting
?Forms![ParamForm]![SYSTEM]
if the value you getting is the system field then, run the query with this
value to see if you getting any result.
If its not the system value, then change it to the right column
?Forms![ParamForm]![SYSTEM].column(1) or else
lazerbrain said:
Made some progress with that change but I have a new problem. Now when I hit
the command button it opens the query but there are no records in the table
even though the combo box has the filter information selected.
:
The parameter name start with form and not forms, try this
SELECT [DRAWINGS AND DOCUMENTS].SYSTEM, [DRAWINGS AND DOCUMENTS].[Site DRWG
#], [DRAWINGS AND DOCUMENTS].[DOCUMENT #], [DRAWINGS AND DOCUMENTS].LOCATION,
[DRAWINGS AND DOCUMENTS].DESCRIPTION, [DRAWINGS AND DOCUMENTS].TITLE
FROM [DRAWINGS AND DOCUMENTS]
WHERE ((([DRAWINGS AND DOCUMENTS].SYSTEM)=[Forms]![ParamForm]![SYSTEM]));
:
The name of the form is ParamForm. The combo box name is SYSTEM.
sql:
PARAMETERS Form!ParamForm!SYSTEM Text ( 255 );
SELECT [DRAWINGS AND DOCUMENTS].SYSTEM, [DRAWINGS AND DOCUMENTS].[Site DRWG
#], [DRAWINGS AND DOCUMENTS].[DOCUMENT #], [DRAWINGS AND DOCUMENTS].LOCATION,
[DRAWINGS AND DOCUMENTS].DESCRIPTION, [DRAWINGS AND DOCUMENTS].TITLE
FROM [DRAWINGS AND DOCUMENTS]
WHERE ((([DRAWINGS AND DOCUMENTS].SYSTEM)=[Form]![ParamForm]![SYSTEM]));
Thanks again.
:
Can you please post
1. name of the form
2. the name of the combo
3. the sql with the where condition
:
Using Access 2000. I have a form with a combo box and a command button set to
open a query. The query criteria is Forms!FormName!ComboBoxName. I also tried
putting Forms!FormName!ComboBoxName in the query>parameter but that didn't
help. My problem is when I press the command button it opens the 'enter
parameter value box' rather than using what was selected in the combo box as
the filter. I know its probably simple enough but I would appreciate the
help. Thanks.