thank you very much for your help.
first option is working.
but in the second option, I try
Dim stDocName As String
stDocName = "Supervsion Staff Assignment(input4)"
DoCmd.OpenReport stDocName, acPreview, , _
"[aenddate] >= #" & Me.astrdate & "# And [aenddate] <= #" & _
Me.aenddate & "#"
it give error message that
"compile error, Method or date member not found"
you like to explain what is the method or date member in the error?
main problem is solve.
Mateen
Quote:
quote:Originally posted by SerranoG
Well, you can do one of two things. Try substituting the single quotes (') in your query to pound signs (#). The single quote deliminates text, the pound sign deliminates dates.
where assignments.aenddate between #03/01/2004# and #03/31/2004#
Or you can put this on your form's command button that opens the report.
DoCmd.OpenReport "Your Report", acViewPreview, , _
"[aenddate] >= #" & Me.astrdate & "# And [aenddate] <= #" & _
Me.aenddate & "#"
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|