List Box Problems

Discussion in 'Microsoft Access Forms' started by Brandon Schultz, Oct 14, 2003.

  1. I have created a list box so that I can navigate through records. The
    AfterUpdate event looks like this;
    Me.RecordsetClone.FindFirst "[SOD_SalesOrderID] = '" & Me![lstSalesOrders] &
    "'"
    Me.Bookmark = Me.RecordsetClone.Bookmark

    SOD_SalesOrderID is a primary key for the query the list pulls from but
    there are duplicate SOD_SalesOrderID records for multiple line numbers
    (SOD_SOLineNbr). So, although the list populates with the the records
    whenever you select Sales Order line number 2, 3, 4 etc. it does not pull up
    the records data in the corresponding text boxes I have on the form. Only
    the first line number pulls in ok. I end up having to use the navigation
    buttons on the bottom; Which I'd like to eliminate.

    Any help would appreciative.

    Brandon Schultz
     
    Brandon Schultz, Oct 14, 2003
    #1
    1. Advertisements

  2. Brandon Schultz

    Michel Walsh Guest

    Hi,


    So, instead of FindFirst, use FindNext:


    With Me.RecordSource
    Me.Bookmark=.Bookmark
    .FindNext strCriteria
    If .NoMatch Then
    .FindFirst strCriteria
    End If
    If .NoMatch Then
    MsgBox "Sorry, no Match"
    Else
    Me.Bookmark=.Bookmark
    End If
    End With



    Hoping it may help,
    Vanderghast, Access MVP





    "Brandon Schultz" <> wrote in message
    news:3f8c5933$...
    > I have created a list box so that I can navigate through records. The
    > AfterUpdate event looks like this;
    > Me.RecordsetClone.FindFirst "[SOD_SalesOrderID] = '" & Me![lstSalesOrders]

    &
    > "'"
    > Me.Bookmark = Me.RecordsetClone.Bookmark
    >
    > SOD_SalesOrderID is a primary key for the query the list pulls from but
    > there are duplicate SOD_SalesOrderID records for multiple line numbers
    > (SOD_SOLineNbr). So, although the list populates with the the records
    > whenever you select Sales Order line number 2, 3, 4 etc. it does not pull

    up
    > the records data in the corresponding text boxes I have on the form. Only
    > the first line number pulls in ok. I end up having to use the navigation
    > buttons on the bottom; Which I'd like to eliminate.
    >
    > Any help would appreciative.
    >
    > Brandon Schultz
    >
    >
     
    Michel Walsh, Oct 17, 2003
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ruzanna
    Replies:
    0
    Views:
    247
    Ruzanna
    Feb 21, 2004
  2. Guest

    Filter List box from List Box

    Guest, Oct 14, 2005, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    153
    [MVP] S.Clark
    Oct 14, 2005
  3. Guest
    Replies:
    2
    Views:
    343
    Guest
    Oct 25, 2005
  4. Jamie Harbour via AccessMonster.com

    Value Selected in LIst Box activiates all values in another List box

    Jamie Harbour via AccessMonster.com, Dec 15, 2005, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    268
    Jamie Harbour via AccessMonster.com
    Dec 15, 2005
  5. Guest
    Replies:
    4
    Views:
    436
    John Vinson
    Jan 13, 2006
Loading...

Share This Page