G
Guest
I am having difficulty getting it set up to use a form to pass date
parameters back to a stored procedure in my adp. This is my first adp so I
am trying to get used to differences between mdb and adp.
Anyway, I searched and found code like this:
Private Sub Report_Open(Cancel As Integer)
Dim strRecordSource As String
strRecordSource = "Exec [lmprodmerge] '5/16/06','5/16/06'"
Me.RecordSource = strRecordSource
This works perfectly (set on open for report). The problems start when I
try to substitute Forms!frmReports.fromdate (and yhe corresponding end date
in the other spot). I get an error stating problems converting varchar to
datetime. (the form fields are set to short date). I see the record source
is converted to string in the dim but can't figure out what to do with the
dates.
Thanks for any help or direction.
John
parameters back to a stored procedure in my adp. This is my first adp so I
am trying to get used to differences between mdb and adp.
Anyway, I searched and found code like this:
Private Sub Report_Open(Cancel As Integer)
Dim strRecordSource As String
strRecordSource = "Exec [lmprodmerge] '5/16/06','5/16/06'"
Me.RecordSource = strRecordSource
This works perfectly (set on open for report). The problems start when I
try to substitute Forms!frmReports.fromdate (and yhe corresponding end date
in the other spot). I get an error stating problems converting varchar to
datetime. (the form fields are set to short date). I see the record source
is converted to string in the dim but can't figure out what to do with the
dates.
Thanks for any help or direction.
John