Reorder (ABC) items in a list box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have three list boxes on a form. They're not in abc order, and I want them
to be. How can I do this?
 
Create queries that order the records in the way you want, and use the
queries as the row sources, not the tables.
 
So right now I have one single query feeding into the form. If I wanted all
three fields to remain, I'd have to have THREE queries feeding into the form?
Would all three queries be the exact same (with the exception of what they
ordered by) but just have one or two fields in them?
 
Not quite sure what you're asking.

The RecordSource for a form is not related to the RowSource for a list box.

A Form can have at most a single query (or table) as its RecordSource.

Each list box (or combo box) on the form needs a RowSource. The
RowSourceType can be "Table/Query" (in which case the data presented is from
the table, query or SQL statement specified as the RowSource property), it
can be "Value List" (in which case the data presented is the list of items
specified as the RowSource property), it can be "Field List" (in which case
it will present a list of field names from the table, query or SQL statement
specified in the RowSource property), or it can be the name of a function
which has a very specific format to provide all of the information required
to populate the control.

What I'm suggesting is that you set the RowSourceType to "Table/Query", and
specify the query that sorts the data correctly as the RowSource. Whether
you're using the same query as the row source for all three list boxes, or
whether you've got 3 separate queries would depend on what you're trying to
show in the list boxes.
 

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

Back
Top