StayAtHomeMom
Technical User
I am using VB code to run a query, but I want to put a Where clause in, so it only runs the query for the RepNo=100 (then RepNo=120, then RepNo=180, etc). Originally, (before I applied VB to it), the query had a parameter that prompted for the RepNo. (RepNo is one of many fields in the design grid for the query) I am trying to avoid that and make everything run automatically, without user intervention. (The RepNos are in a separate table that I'm using a Do-Loop to loop thru and run the query against every RepNo in that table). I cannot find a way to insert a Where clause for the [RepNo]=100, et al. I see how to do it when running a report, or outputting to a form, but not a query. Any suggestions?