Results 1 to 4 of 4
  1. #1
    Pete Moss is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2015
    Posts
    2

    Auto complete & auto add

    Suppose I want to create an application to keep track of my favorite ice cream cone flavors. Each time I buy an ice cream cone, I want to record the date, time, vendor, flavor, cost, and a rating (0-10).

    Let's call my primary table tblSamples. It will have foreign key fields to tblVendors and tblFlavors.

    My primary data entry form, frmSamples, will allow me to enter the data for each ice cream cone purchase.

    Question #1: Can I set up some type of a "look up" control on frmSamples for the flavor and the vendor that get their data from tblFlavors &tblVendors?



    When I get to the Flavor control, I will be shown a dropdown list showing the first few flavors in tblFlavors. As I start typing the flavor of the cone I just ate, the dropdown list will position itself at the first entry matching the letters typed. When I get to the correct flavor, I can press Enter of Tab to accept it. If the flavor is not in tblFlavors, I can press Enter or Tab and have a new form appear that will allow me to enter that flavor into tblFlavors and then, on return, enter that flavor into the first form.

    Suppose tblFlavors has these flavors:
    • Apple Pie
    • Banana
    • Caramel
    • Chocolate
    • Chocolate Chip
    • Chocolate Decadence
    • Chocolate Fudge
    • Chocolate Mint
    • Chocolate Swirl
    • Cinnamon


    When I get to the Flavor control, I would be shown the first 5-6 flavors. I could use the down arrow key (or the page down key) to find the flavor I want or just start typing its name. If I type "c", the list would be positioned at "Caramel". If I then typed "h" ("ch"), the list would move down 1 to the first Chocolate, and so on.

    If I had bought a new flavor, "Chocolate Nut", when I got to the "N", I would be shown that that flavor does not exist in the database and offered the option to add it. This would probably entail bringing up another form (frmFlavors), which I could also access independently to add flavors.

    Is this possible in Access 2007?

    Can someone give me some pointers on what features to read up on or an outline as to how to set it up?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    This would be a combobox using NotInList event to allow entry of new flavor or vendor 'on-the-fly' during data entry.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Pete Moss is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2015
    Posts
    2
    Quote Originally Posted by June7 View Post
    This would be a combobox using NotInList event to allow entry of new flavor or vendor 'on-the-fly' during data entry.
    Thank you.

    Can the NotInList event be used to put up a different (child?) form to complete the new record in the look-up table?

    And will that new entry then be available in the first (parent?) form for selection?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Yes, with proper coding. Fairly common topic in forum. Start with https://www.accessforums.net/access/...ate-55139.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Auto Complete A Subform
    By dgutsche in forum Forms
    Replies: 1
    Last Post: 08-14-2014, 04:10 PM
  2. How to auto-complete a data entry.
    By gottnoskill in forum Forms
    Replies: 8
    Last Post: 01-23-2014, 02:04 PM
  3. auto complete fields
    By mona in forum Access
    Replies: 3
    Last Post: 05-09-2012, 07:41 AM
  4. Replies: 3
    Last Post: 11-04-2011, 01:50 PM
  5. Auto Complete Data
    By manicamaniac in forum Access
    Replies: 5
    Last Post: 09-14-2010, 03:38 PM

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