Print an ordered access report
I have a report, which I need to order by one of the fields. I tried using a query for the report, but when I run the report I get a parameter prompt with the name of the query, not one of the fields? Here's my code for calling and printing the report:
vb Code:
Set objaccess = CreateObject("Access.Application")
With objaccess
.OpenCurrentDatabase filepath:="c:/db1.mdb"
.DoCmd.OpenReport "pok_rep", acPreview, WhereCondition:="[data_pogrebenie] like '*" & Combo1.Text & "'"
End With
Any ideas?