DoCmd.OpenReport parameter problem

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
 
T

Tim Ferguson

(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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top