I have created form, query and report.
In the form I have a Combo Box which pulls the search criteria
(SaleStatus) from one of my tables. When I select a status and click
on the search button it should run the query and then preview the
report.
The form is an unbound form with the row source type set to
table/query. The row source is a select statement pulling the data from
the table. The Name of the combobox is SaleStatus.
The search button has the following code attached to the on click
event:
Private Sub cmdSEARCH_Click()
DoCmd.OpenReport "rptPROPERTY", acViewPreview
End Sub
The query has the following code in the criteria:
[forms]![fmPROPERTY]![SaleStatus]
Here is what is happening.
If I change the box to a text box and manually type in the status and
click on the command button, the report is previewed with the correct
information being displayed.
If I however, use a Combo Box or a List Box, the data in the previewed
report is blank.
What am I not doing correctly here...
Thanks,
Ray.