hi all, need some help with something I haven't used in the past. I need to use vba to pass a query which contains two conditions. Here's what I have so for but it doesn't work. I can't see where i've gone wrong so hoping to get so help.
I need to pull all records where the field "Claim_New" = 0 and where the field "Completed" = 0
Dim sql As String, qdf As Dao.QueryDef
Set qdf = CurrentDb.QueryDefs("qry_dc_claims")
qdf.sql = "SELECT masterboltracker.ID, masterboltracker.batch, masterboltracker.datedelivery, masterboltracker.store, masterboltracker.bol, masterboltracker.sku, masterboltracker.description, masterboltracker.skuontag, masterboltracker.shipped, masterboltracker.received, masterboltracker.variance, masterboltracker.completed, masterboltracker.extended, masterboltracker.dept, masterboltracker.from_dc_number, masterboltracker.claim_new " & _
"From masterboltracker " & _
"WHERE masterboltracker.claim_new = 0, masterboltracker.completed = 0;"
thanks in advance!
I need to pull all records where the field "Claim_New" = 0 and where the field "Completed" = 0
Dim sql As String, qdf As Dao.QueryDef
Set qdf = CurrentDb.QueryDefs("qry_dc_claims")
qdf.sql = "SELECT masterboltracker.ID, masterboltracker.batch, masterboltracker.datedelivery, masterboltracker.store, masterboltracker.bol, masterboltracker.sku, masterboltracker.description, masterboltracker.skuontag, masterboltracker.shipped, masterboltracker.received, masterboltracker.variance, masterboltracker.completed, masterboltracker.extended, masterboltracker.dept, masterboltracker.from_dc_number, masterboltracker.claim_new " & _
"From masterboltracker " & _
"WHERE masterboltracker.claim_new = 0, masterboltracker.completed = 0;"
thanks in advance!