where clause of OpenReport

vijay

Registered User.
Local time
Yesterday, 19:54
Joined
Apr 28, 2003
Messages
16
Iam trying to open a report(based on a query)from a form.
i need to concatinate 3 field values on the form to get a date.
when i try to run the report by clicking on the command button,am told theres a type mismatch.

my command button has this under it:

Dim stRelMonth As String
Dim stRelYear As String
Dim stRelease1 As String
Dim stRelease2 As String
Dim stRelease As Date

stRelMonth = Form_SysInfo_Rep_MainForm!Rel_Month.Value
stRelYear = Form_SysInfo_Rep_MainForm!Rel_Year.Value
stRelease1 = stRelMonth & "-" & " & stRelYear & "
stRelease2 = "01-" & " & stRelease1 & "
stRelease = stRelease2

MyWhere = "(((System_Information.sys_type)= '" & stSysType & "') AND (System_Information.from_date) = DateAdd('d', -7,'" & stWeek & "') AND (System_Information.release) = '" & stRelease & "')"

Please suggest something .....

thanks
 

Users who are viewing this thread

Back
Top Bottom