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:
  1. Set objaccess = CreateObject("Access.Application")
  2. With objaccess
  3.         .OpenCurrentDatabase filepath:="c:/db1.mdb"
  4.        .DoCmd.OpenReport "pok_rep", acPreview, WhereCondition:="[data_pogrebenie] like '*" & Combo1.Text & "'"
  5. End With

Any ideas?