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
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