H
hima
Can anyone check the synatx of this query..i am new to acess sql.....
"SELECT DTPanel FROM TestTable INNER JOIN VehicleTable" & _
" ON TestTable.DoorTrimPanelID =
VehicleTable.DoorTrimPanelID" & _
" WHERE (VehicleTable.OEM = """ & Me.cboOEM.Column(1) &
"""" & _
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.cboModelYear.Column(1) & """" )
" OR (VehicleTable.OEM = """ & Me.CboOEM2.Column(1) &
"""" & _
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel2.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.CboModelYear2.Column(1) & """")
" OR (VehicleTable.OEM = """ & Me.CboOEM3.Column(1) &
"""" & _
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel3.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.CboModelYear3.Column(1) & """")
" OR (VehicleTable.OEM = """ & Me.CboOEM4.Column(1) &
""""
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel4.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.CboModelYear4.Column(1))
"SELECT DTPanel FROM TestTable INNER JOIN VehicleTable" & _
" ON TestTable.DoorTrimPanelID =
VehicleTable.DoorTrimPanelID" & _
" WHERE (VehicleTable.OEM = """ & Me.cboOEM.Column(1) &
"""" & _
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.cboModelYear.Column(1) & """" )
" OR (VehicleTable.OEM = """ & Me.CboOEM2.Column(1) &
"""" & _
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel2.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.CboModelYear2.Column(1) & """")
" OR (VehicleTable.OEM = """ & Me.CboOEM3.Column(1) &
"""" & _
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel3.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.CboModelYear3.Column(1) & """")
" OR (VehicleTable.OEM = """ & Me.CboOEM4.Column(1) &
""""
" AND VehicleTable.VehicleModel = """ &
Me.CboVehicleModel4.Column(1) & """" & _
" AND VehicleTable.ModelYear = " &
Me.CboModelYear4.Column(1))