Syntax Help

R

RobUCSD

This line of code works perfectly;

Me.lstChargeMaster.RowSource = "SELECT * FROM tblChargeMaster " & _
"WHERE fldChargeTypeCode = 'SA' "

The line below does not. I'm trying to filter on multiple criteria and then
sort the results.

Any help would be greatly appreciated. Thank, Rob


Me.lstChargeMaster.RowSource = "SELECT * FROM tblChargeMaster " & _
"WHERE fldChargeTypeCode = 'SA' AND 'SAD'" & _
"ORDER tblChargeMaster.fldAlternateDescription"
 
K

Klatuu

Me.lstChargeMaster.RowSource = "SELECT * FROM tblChargeMaster " & _
"WHERE fldChargeTypeCode IN('SA', 'SAD') "
 
R

RobUCSD

Thank you Dave. As you can tell I'm a total rookie here. Can you help with
the order by statement at the end of the line you just provided? Thanks, Rob
 
D

Douglas J. Steele

Me.lstChargeMaster.RowSource = "SELECT * FROM tblChargeMaster " & _
"WHERE fldChargeTypeCode IN ('SA', 'SAD') " & _
"ORDER BY fldAlternateDescription"
 
Top