G
gmazza via AccessMonster.com
Hey there,
Is it possible to have a where condition on a query in VBA?
I am opening a recordset based on my query and wanted to add a where
condition on the product type as we have many products.
So here is my statement:
Set rs = CurrentDb.OpenRecordset("qryPromotions", dbOpenDynaset, dbSeeChanges)
I want to add "where ProdType = DI"
Then after I am done the processing needed for this recordset, I want to open
another one, based on the same query, but for a different ProdType.
I don't want to have to create 10 different queries for 10 different
ProdTypes, instead, I have my main query, just wanted to add a condition on
it.
Please let me know, thanks!!
Is it possible to have a where condition on a query in VBA?
I am opening a recordset based on my query and wanted to add a where
condition on the product type as we have many products.
So here is my statement:
Set rs = CurrentDb.OpenRecordset("qryPromotions", dbOpenDynaset, dbSeeChanges)
I want to add "where ProdType = DI"
Then after I am done the processing needed for this recordset, I want to open
another one, based on the same query, but for a different ProdType.
I don't want to have to create 10 different queries for 10 different
ProdTypes, instead, I have my main query, just wanted to add a condition on
it.
Please let me know, thanks!!