How to populate a value list

E

ericb

I have a field that is a valuelist. I select the value from a list that I
typed in.

That is fine.

But I need to have those value in the order of selection. Ex : I have in the
list the value from a to z. I select f, m, a. I want them to show up in that
oder.

At best I would like to use the same thing as Access when we define a
combobox, we have 2 lists : the available field and the selected fields with
4 buttons in the middle.

Can that be done ?

Thank you
 
J

John W. Vinson

I have a field that is a valuelist. I select the value from a list that I
typed in.

No, the field is NOT a valuelist. The field is a Number or a Text value. It
appears that you're another victim of the misleading, misbegotten Lookup
Field:

http://www.mvps.org/access/lookupfields.htm
That is fine.

But I need to have those value in the order of selection. Ex : I have in the
list the value from a to z. I select f, m, a. I want them to show up in that
oder.

At best I would like to use the same thing as Access when we define a
combobox, we have 2 lists : the available field and the selected fields with
4 buttons in the middle.

I have no trace of an idea what you're talking about: "4 buttons in the
middle"?????

You should certainly be using a Form; rather than a value list, you should be
using a combo box based on a Query selecting and sorting records from a table.
Value lists are *very* limited and should never be used if the list is
intended to be editable.
 
E

ericb

I'm sorry but sometimes I try to simplify so much that it is hard to
understand. I need to correct that.

What I have is a list of materials. I want to select some of those materials
and put them in another list. The important thing here is the order of
selection. The partial list must reflect and respect my order of selection.

I was thinking of doing the same thing as Access does in the whizard that
makes a combo box. It comes a time when the whizard will show you 2 lists.
One with the fields to select from and the other list is the selected fields,
in the center of those 2 lists you have the "4 buttons", actually they are
the arrows to select and unselect.

I want to do something like that but I don't know how to. That is why this
field was going to be a value list.

I hope I am more understandable.

Thank you for your help.
 
J

John W. Vinson

What I have is a list of materials. I want to select some of those materials
and put them in another list. The important thing here is the order of
selection. The partial list must reflect and respect my order of selection.

I was thinking of doing the same thing as Access does in the whizard that
makes a combo box. It comes a time when the whizard will show you 2 lists.
One with the fields to select from and the other list is the selected fields,
in the center of those 2 lists you have the "4 buttons", actually they are
the arrows to select and unselect.

I would suggest two Listboxes, based on queries; you can put command buttons
(with arrow graphics) between them, and put VBA code in the buttons' Click
events to run queries to delete selected records from the source listbox and
add to the target. If the order of records is critical you may also want up
and down arrows to promote or demote selected records.

This won't be "out of the box" functionality, you'll need VBA code to do it. I
have seen this done but don't have a reference or example handy, but it's not
too difficult. Post back if you get stuck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top