Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Reorder (ABC) items in a list box

Discussion in 'Information Technology' started by Jennifer Cali, Jul 28, 2006.

  1. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    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?
    --
    Thank you! - Jennifer
     
  2. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Create queries that order the records in the way you want, and use the
    queries as the row sources, not the tables.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    news:71C734EC-B4DB-43E5-824A-F7E02242A415@microsoft.com...
    > 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?
    > --
    > Thank you! - Jennifer
     
  3. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    Guest

    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?
    --
    Thank you! - Jennifer


    "Douglas J. Steele" wrote:

    > Create queries that order the records in the way you want, and use the
    > queries as the row sources, not the tables.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    > news:71C734EC-B4DB-43E5-824A-F7E02242A415@microsoft.com...
    > > 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?
    > > --
    > > Thank you! - Jennifer

    >
    >
    >
     
  4. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    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.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    news:1B505BC7-834A-4F15-8C2F-FD6222D26FF0@microsoft.com...
    > 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?
    > --
    > Thank you! - Jennifer
    >
    >
    > "Douglas J. Steele" wrote:
    >
    > > Create queries that order the records in the way you want, and use the
    > > queries as the row sources, not the tables.
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no private e-mails, please)
    > >
    > >
    > > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in

    message
    > > news:71C734EC-B4DB-43E5-824A-F7E02242A415@microsoft.com...
    > > > 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?
    > > > --
    > > > Thank you! - Jennifer

    > >
    > >
    > >
     
  5. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    Guest

    Ok, that makes perfect sense now. Thank you, Doug, for clarifying!
    --
    Thank you! - Jennifer


    "Douglas J Steele" wrote:

    > 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.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in message
    > news:1B505BC7-834A-4F15-8C2F-FD6222D26FF0@microsoft.com...
    > > 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?
    > > --
    > > Thank you! - Jennifer
    > >
    > >
    > > "Douglas J. Steele" wrote:
    > >
    > > > Create queries that order the records in the way you want, and use the
    > > > queries as the row sources, not the tables.
    > > >
    > > > --
    > > > Doug Steele, Microsoft Access MVP
    > > > http://I.Am/DougSteele
    > > > (no private e-mails, please)
    > > >
    > > >
    > > > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in

    > message
    > > > news:71C734EC-B4DB-43E5-824A-F7E02242A415@microsoft.com...
    > > > > 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?
    > > > > --
    > > > > Thank you! - Jennifer
    > > >
    > > >
    > > >

    >
    >
    >
     

Share This Page