Passing data from listbox to a field

deejay_totoro

Registered User.
Local time
Today, 16:24
Joined
May 29, 2003
Messages
169
Hello,

I am having some trouble with subform, listbox, add button and field for storing!

Basically, what I would like to do is: the user makes a selection from a list box, and this value should be passed to a field for the data to be stored.

At first I just used the wizard, but I found that when a user selects anything in the listbox list, a new record is autmatically created.

So I thought, the best way to get around this is to create an "add button" that adds the data selected in the list box (column 1) to a specified field. Then, the user can click away - but the value will not be recorded until the user clicks on the "add" button.

Is this the right solution? And of course, how do I go about this?

Thank you very much!

dj_T
 
I am not sure how the subform figures in but code like this in the After Update event of the list box will put the value selected into a control on the form:

Me.MyControlName = Me.MyListBoxName

Change the names above to the actual names of your control and list box.

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom