Multiply Selection Update Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating an update query that will allow manager to update the contacts
that a store should call. To make it easier for the manager I created a form
that that can use to run this query. The only problem is that they would
have to run the query for each region effected by a change and we have over
40 regions. I tried using a list box but the query won't run. Is there
something special that I need to do to get the update query to pick up all
the selections in a list box to avoid the managers to run the query more than
once.

Thanks,

wtadder
 
Hello wtadder.
I am creating an update query that will allow manager to update the
contacts that a store should call. To make it easier for the manager
I created a form that that can use to run this query. The only problem
is that they would have to run the query for each region effected by a
change and we have over 40 regions. I tried using a list box but the
query won't run. Is there something special that I need to do to get
the update query to pick up all the selections in a list box to avoid
the managers to run the query more than once.

The query can't pick all selected items, but vba code can and it can
run a query for each selected item:

For Each varItem in lstMyListbox.ItemsSelected
MsgBox "Selected: " & lstMyListbox.ItemData(varItem)
MsgBox "The second column is: " & lstMyListbox.Column(1, varItem)
Next

Of course, instead of displaying message boxes, your code can perform
whatever you want.
 
Back
Top