Results 1 to 7 of 7
  1. #1
    gprzytula is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Posts
    16

    form with lookup field

    I have a form where i have to fill some data. this data is checked with a table-column and i can drop down the column to see the different values
    now i have 2 entries that are similar huwelijksaankondigingen en huwelijksakten


    if i type the h it prompts for the first entry, but i would like to have a different shortcut for the second value, otherwise i have to type huwelijksak to be prompted for the second value
    or is it possible to assign this value to a funtion key, so when pressing this fk, it enters the second value
    thanks for all help/info
    best regards, Guy

  2. #2
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    433
    maybe you can make use of Combobox Filter As You Type.
    see this demo and open Sales form.
    on the form click on Customer combobox and type "h" (do not include the quote)
    Attached Files Attached Files

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    I just use the down arrow?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Join Date
    Apr 2017
    Posts
    1,792
    Simply order the combo's source query by displayed (name, comment, or whatever) field.

    Now when you want to select from combo, ...
    when you type "h", the 1st selection starting with "h" is displayed, with other selections starting with "h" following in alphabetical order;
    when you type "hu", the selection activates from top of list of them starting with "hu";
    etc.

    At some moment the list of following selections will be short enough to use down arrows (unless you get the wanted entry activated as you typed enough characters for this to happen). Of-course in case you have hundreds or thousands selections all starting with "huwelijksak", then you are out of luck

  5. #5
    gprzytula is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Posts
    16
    Yes, I understand
    I was just wondering if it could be assigned to a function key
    but is not a huge problem to type huwelijksak to get the correct value huwelijksakten instead of the first entry huwelijksaan..
    many thanks for all info
    best regards, Guy

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Please review the attached sample, you can use double-click the combo (after you typed "H" so it selects the first entry) to move to the next entry; the code would advance to the next entry in the list as long as you made an initial selection.
    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #7
    gprzytula is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Posts
    16
    thanks for the sample
    Guy

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

Similar Threads

  1. Replies: 9
    Last Post: 10-10-2019, 05:13 PM
  2. Replies: 4
    Last Post: 03-17-2016, 07:16 AM
  3. Lookup values not appearing in Lookup field?
    By dominover in forum Access
    Replies: 4
    Last Post: 03-05-2016, 05:01 PM
  4. Replies: 3
    Last Post: 05-08-2015, 11:08 AM
  5. Replies: 5
    Last Post: 06-25-2014, 09:19 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