I have a user pick a date in VB6 and try to pass it to a report with the following code:
Report.RecordSelectionFormula = "{ado.startWK} = #" & stDate & "#"
the variable 'stDate' is a date.
I get an error. Any ideas welcome. Thanks...
Sorry about that. My error is "A number, currency amount, boolean or string is expected here." The code hangs at Report.RecordSelectionFormula = "{ado.startWK} = #" & stDate & "#"
Curious because ado.startWk is formated as Date/Time field in my access database.
The following code comes just before my Report.RecordSelectionFormula.
Dim stDate As Date
stDate = CDate(SSDateCombo1.Text)
Report.RecordSelectionFormula = "{ado.startWK} = #" & stDate & "#"
'===================
Report.RecordSelectionFormula = "{ado.startWK} = #3/3/2003#" is what is being output.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.