Results 1 to 3 of 3
  1. #1
    Adam1970 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Feb 2023
    Posts
    30

    How to add item from listbox into subform order line line entry

    Hi
    I watched a YouTube video titled as per this title.
    I currently have a search box in the main form that brings up items. I cannot work out how I select a specific item and get it to add to a continuous form for further manual editing IE adding price & qty etc
    Any help will be appreciated.
    Thanks


    Adam

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    dbl-click the item in the listbox will execute an append query:
    docmd.openquery "qaAddItem2Cart

    the query will add the item in tSupply table to the target tCart table , using the KEY of your current record

    like:
    INSERT INTO tCart (Key, Itemno)
    SELECT forms!fMyForm!txtKey, [itemNo] FROM tItems
    WHERE (tItems.ItemNo)=[forms]![fMyForm]!
    [listBox]

  3. #3
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,525
    If you want to select multiple items:

    http://www.baldyweb.com/MultiselectAppend.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 24
    Last Post: 09-14-2021, 02:37 PM
  2. Import .csv file line item by line with modifications
    By jmichaels in forum Import/Export Data
    Replies: 22
    Last Post: 04-05-2020, 01:44 PM
  3. Replies: 5
    Last Post: 05-02-2019, 09:46 AM
  4. Replies: 15
    Last Post: 11-25-2014, 03:42 PM
  5. Help generating line item number in order table
    By acenumber5 in forum Queries
    Replies: 18
    Last Post: 08-23-2012, 12:50 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