
SQL Query using WHERE and AND
Sorry if this appears twice. I got a page fault when I posted the
first time and don't know if it went through.
I am trying to use an SQL query to create a recordset using parameters
from two drop down boxes.
DIM strSQL as string
strSQL="Select * FROM MyFile WHERE IDCategory=" & _
cboIndex.ItemData (cboIndex.ListIndex) & _
"AND LanguageID=" &
cboLanguage.ItemData(cboLanguage.ListIndex)
datMain.Recordsource=strSQL
datMain.Refresh
I get an error "Too few parameters. Expected 1"
Without the AND and the second condition it works fine. How can I use
more than one condition to get the recordset I want?
Thanks,
Scott