Help :(, how to store multiple selections from a listbox

alptester

New member
Local time
Today, 06:16
Joined
Oct 28, 2010
Messages
6
Hi,

I am trying to modify an existing form and I have to store multiple selections from a list box.

I have done single selection and that was very easy, I had to just 'bound' it to the column name.

Pls help.
 
Hi Paul.

Thanks for your response.

I wrote a small routine

Private Sub Form_Current()
MsgBox("Hello World")
End Sub

for the On Current event, but that doesn't seem to execute. And if click the 'Play' button on the VB window it errors me telling me that the macros are not allowed etc. How dow I allow the code to execute?

Thanks


Proper normalized design would dictate that the choices be stored in a related table, so I typically use a technique like this:

http://www.baldyweb.com/MultiselectAppend.htm

There's also this:

http://support.microsoft.com/default.aspx?scid=kb;en-us;210203

but I would not store data that way. It will seem easy at first, but you'll likely regret it in the long run.
 
I assume you have 2007 or 2010. The database must be in a trusted location, or you have to enable code by clicking on the option in the menu bar.
 
So did one of the two suggested fixes get code running?
 
Yes Paul,

The second link (MS) worked for me.

YOU ROCK!!

Thanks for your help.
 
Happy to help! Hopefully you read the "drawbacks" section.
 
It shouldn't be a problem. Its not *mission-critical* data.

I didn't want to go beyond one table, just to keep things simple for the actual user of the database. The user who is going to maintain the app is not IT savy, so I didn't want to complicate things for her.
 
I have used ACCESS in the past but not with FORMS. So in this regard it was my first (hopefully only :) ) exposure.
 
is there a way to append it to a query? or create a query?
I was working with the baldy reprort one, which worked great. but trying to push data into a query. do you have that code selection by chance?
 
yes thanks baldy, I wasn't sure if the post would be seen since it was added to a late thread.
 

Users who are viewing this thread

Back
Top Bottom