PDA

View Full Version : [SOLVED:] Multipul Selection from a list box



hatched850
02-09-2007, 07:23 AM
Is there a way in a form to select multipul Items from a list box? I have a form with a list of things to order. I want to know if I can select multipul Items from the list of publications? :help As always I have come to the BEST for help!

hatched850
02-09-2007, 09:27 AM
I have gotten it to select mulipul Items in the list but I get this error: You tried to Assign the Null Value to a variable that is not a variant Data type. Can anyone help? PLEASE

OBP
02-09-2007, 12:34 PM
Hatched, to get this error you must be doing something with the "multiple items" data, so what is it and is this when you get the error.
Can you post a copy of the Code that you get when you "Debug" the error please?

hatched850
02-09-2007, 12:42 PM
That is what I was trying to do, but I searched around and from what I understand it can't be done. So I was trying to put a subform in with just the information I need and I can't seem to get things right. I have been working on it all day and it is driving me crazy!!! LOL Now I am getting an error that says you can not assign a value to this object. The object in a read only form; The object maybe open on a form in design view ect.

OBP
02-09-2007, 12:47 PM
Well Hatched do you want to Post a copy on here or email it to me?
I can't really help without seeing the form(s) and the code that produces the error.
I have taken the Source Row from a "Multiple Selection" List Box and put in fields and VB Variables, so I need to know what you want to do with the data.
As I am in the UK I may not be able to post the answer back until tomorrow.

hatched850
02-09-2007, 12:50 PM
I can do it either way which do you prefer

OBP
02-09-2007, 12:55 PM
Hatched, if it is all right with you I would suggest a ZIPPED copy on here.
It needs at least some Dummy Data in it for me to work with and an explanation of want you want to do with the Multiple Selection when you have got it.
Also if you could PM me your email address in case I have any more questions, as that might save some time.

hatched850
02-09-2007, 01:10 PM
:devil2: I am trying to have more than one publication selected to order. On the publication order form. Like if some one calls in and orders several different publications I can select them all and put them into one order. I have done it with one order and have been filling out one form per Publication but that is getting really old. If you know what I mean. Thank you for your help as always you are the best!

OBP
02-10-2007, 07:13 AM
Hatched, I couldn't get the Multi-Select List Box to do what you wanted because your Data Structure (Tables and Relationships) didn't allow for this to be done efficiently.
I have instead re-arranged the Database by creating an Order Details Table/Query which your Subform is now based on. I have replaced the List box (because of it's size) with a Combo Box.
I have moved the Quantity Ordered fields on to the subform, so each Item has it's own quantity.
If you already have lots of old records in the old "Single Order" format then I can help you create an append query to put the data in to the new "Order Details" table, so that you do not lose them.
I have reset the Table Relationships with Referential Integrity set, so that they are now One to Many Relationships.
I have also created a Publication Order query to show how all the tables are brought together to provide the data necessary for printing the order on a Report.

Have a look at let me know if it does what you wanted.

hatched850
02-12-2007, 10:05 AM
Works Beautifully. You are WONDERFUL!!! THANK YOU SO MUCH FOR YOUR HELP! I see now what I was doing wrong.

Debbie