Confirming selection from a listbox

  • Thread starter Thread starter ghobbitnz
  • Start date Start date
G

ghobbitnz

Guest
Hi there

This is what I'm trying to acheive and I'm sure its possible but cant quite get my head around it to do it.

I have a form with a multi select list box from which our customers can select a number of items they would like added to their worklist for the day. They then click on a command button which then sends those items to a table from which our employees then generates a worklist.

However what I would like is that once the customer has entered their selections I would like them to be able to click another command button before submitting the work to the table which would then show them the selections they have made before the info is submitted to the table. They would then review what they've selected and make additions or subtractions as neccessary.

I'm not sure whether or not I have to create two tables the first of which would hold their initial selections and then the first button would then run a query based on that first table and then once they click the submit button it sends that info to another table from which the days worklist can be drawn.

Another question is what if once they've reviewed what they've selected and wish to remove something? If selections go to a temporary table and then they unslected an item will that remove it from the table or would it create a new record which is not what I want.

If you could help that would be most aprreciated. I know very little in the way of coding so any explicit instructions would be most welcomed

regards

Steve
 
You could populate another list box with the query matching the selections of the first list box. Just loop through the Selected list box record values to build the WHERE condition for the same query and apply it to the new list box.

YOu can even use the same list box, just create the new query with the Where clause and reattach it through VBA using the RowSource property of the listbox. Doing it this way allows you to undergo unlimited recursive deletions until you have just what you need.

My first recommendation is to search Access for List box Selected examples.
 
thanks Mresann
 
Here's an example that shows how to move things from one listbox to another. It may not work in versions earlier than 2003 because the AddItem method of the ListBox is relatively new.

You'll need to add a "finish" button where you will loop through all the items in the second listbox and either "move" the records to another table or (my recommendation) update a field on them that identifies which list they belong to.
 

Attachments

Users who are viewing this thread

Back
Top Bottom