Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List box Multiselect w/Update 1

Status
Not open for further replies.

skanrey

IS-IT--Management
Oct 31, 2002
23
US
I am creating a new form to take multiselected tech id numbers and assign a dispatcher to monitor them. Each tech has multiple jobs assigned to him in a table. The list box I created from a query to ID techs with jobs for that day in the table. I have added a combo box with the source for the dispatcher table. This is all on an unbound form. Both fields are working properly at this time. I tried using an update query to update the table for the selected techs jobs with the single dispatcher ID. This didn't return any updated info.

UPDATE Installations SET Installations.Disp_Assign = [Forms]![frmDispatch_Tech_Assign]![cboDispatchers]
WHERE (((Installations.[Tech #])=[Forms]![frmDispatch_Tech_Assign]![lstOpenTech's].[InSelection]));

I have not worked with multiselect much so the code to do this is beyond me at this point. I have read through some strings on here on multiselect but not found what I believe would work.
 
If code is "beyond" you then you will need to set the list box to single selection. If you want to implement multi-select, you can check the Access Queries FAQs for some solutions.

Duane
Hook'D on Access
MS Access MVP
 
I think you misunderstood my statement regarding coding. I was a bit surprised with your response. I have a fair amount of coding knowledge but as I said I had not ventured much into this particular object. I am in now way a programmer but do make do on my own with little help. I have come to these forums before and received much better understanding and help with previous issues. There was not even a mention of the string I had included and what might be wrong with it. With some help and direction I have gotten the code for this item taken care of and it is working fine. Now I have that knowledge to work with in the future.
 
Only VBA may play with the ItemsSelected collection of the ListBox.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top