Results 1 to 5 of 5
  1. #1
    jackkent is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    12

    Navigate to a record in a listbox


    This seems like a very simple issue but I can't seem to find the correct code to accomplish what I want to do:

    I would like to be able to navigate to the first instance of a given field in a listbox. My form includes labels A B C D ... If the user wants to navigate to the first instance of a given field in the listbox, say for example the word begins with "W" he/she would click on W. I would like to scroll to that first instance of "W" in the given field.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    there are a couple of methods that work. try using
    Code:
    docmd.findrecord "listboxvalue"
    that's not really a great method though because it's ambiguous. for minimal code though, it works fine. check out the syntax in the help menu. the arguments are there too, which it has plenty.

  3. #3
    jackkent is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    12
    Thank you for your response... I did see your solution however I have multiple values in the listbox. Is there a way to use the value in a specific field?

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by jackkent View Post
    Thank you for your response... I did see your solution however I have multiple values in the listbox. Is there a way to use the value in a specific field?
    you mean a specific row item?
    Code:
    me.listbox.column(columnNumber, RowNumber)
    cols and rows are indexed at 0, so the first col =0, first row=0, etc, etc...

  5. #5
    jackkent is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    12

    Thanks

    Thanks... Got it working with your help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. VBA to Navigate form
    By asmith in forum Access
    Replies: 3
    Last Post: 09-30-2010, 11:37 AM
  2. Navigate window to import txt
    By Macallan60 in forum Access
    Replies: 11
    Last Post: 05-13-2010, 12:30 PM
  3. Replies: 2
    Last Post: 03-25-2010, 12:11 PM
  4. Listbox question
    By uaguy3005 in forum Access
    Replies: 1
    Last Post: 03-05-2010, 08:35 AM
  5. Replies: 1
    Last Post: 09-19-2009, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums