DoCmd.OpenReport parameter problem

  • Thread starter Thread starter Ginola
  • Start date Start date
G

Ginola

Hi,

I have the problem when I use the parameter of docmd.opeReport.
I have the codes like the bottom


strFilter = " ((PurchaseOrder.DeliveryDate) Between #" &
Format(strDateStart, "DD-MMM-YYYY") & "# AND #" & Format(strDateEnd,
"DD-MMM-YYYY") & "# )"
DoCmd.OpenReport "rptComponentBreakdownInventoryForSupplier",
acViewPreview, , strFilter

the Where clause statement is correct when I apply it to the query
which use by the report "rptComponentBreakdownInventoryForSupplier"

When I run the codes, a message box "Enter parameter value
PurchaseOrder.DeliveryDate" pop up and ask me the value.

does anyone know the reason? Any solution ?

thanks
 
(e-mail address removed) (Ginola) wrote in
When I run the codes, a message box "Enter parameter value
PurchaseOrder.DeliveryDate" pop up and ask me the value.

This is practically always because the fieldname is misspelled, or else it
does not exist in the query. I would certainly remove the "PurchaseOrder."
part, since you can only have one column in the query called DeliveryDate
anyway. And check the spelling of DeliveryDate too.

Hope that helps


Tim F
 
Back
Top