Hi,
I am using access 2003 and have some code that opens a form and filters it using the werecondition, the code works apart from the "Measure" i need it to filter it for any of the 3 options 'loft' Or 'boards' Or 'Loft & Boards' which filters fine when manually entered into the filter but am having problems finding the correct syntax for it to put this in automatically, the code i have currently which all works other than the "Measure =" is:
I am using access 2003 and have some code that opens a form and filters it using the werecondition, the code works apart from the "Measure" i need it to filter it for any of the 3 options 'loft' Or 'boards' Or 'Loft & Boards' which filters fine when manually entered into the filter but am having problems finding the correct syntax for it to put this in automatically, the code i have currently which all works other than the "Measure =" is:
Code:
Dim stDocName As String stDocName = "Main Table" DoCmd.OpenForm stDocName, acNormal, , "[Postalcode] Like '" & PostalAreatxt & "*' and Measure= & 'loft' & " Or " & 'boards' & " Or " & 'Loft & Boards' and [Cancel Contract?] =False and IsNull([Completion Date]) and IsNull([Fit Scheduled Date1]) and IsNull([Fitters Names1])"
Comment