J
jbiggs via AccessMonster.com
I am trying to write a query that will assign x number of leads to a certain
sales rep. I am not sure about the best way to accomplish this, should I
save a top 1 query and then loop through or imbed a select statement in my
update query?
I have been trying to use something like:
DoCmd.RunSQL "UPDATE clients SET salesperson = " & [sales rep name] & " WHERE
IN ( SELECT TOP " & Howmany & " FROM clients " & " WHERE Salesperson IS
NULL And Source = [leadsource] )"
With no success thus far.
sales rep. I am not sure about the best way to accomplish this, should I
save a top 1 query and then loop through or imbed a select statement in my
update query?
I have been trying to use something like:
DoCmd.RunSQL "UPDATE clients SET salesperson = " & [sales rep name] & " WHERE
IN ( SELECT TOP " & Howmany & " FROM clients " & " WHERE Salesperson IS
NULL And Source = [leadsource] )"
With no success thus far.