Results 1 to 3 of 3
  1. #1
    SunTop is offline Advanced Beginner
    Windows 8 Access 2016
    Join Date
    Aug 2016
    Posts
    93

    Checkbox on subform

    Hello everyone,

    I have a form that I use to create orders for customers. Inside that form I have a subfrom that I select products from to go with the order. The controls on the main form are attached to the orders table and the data the user inputs in the main form goes directly to the orders table. The subform has a combo box in it, that has the row source set to the products table and the control source is set for the order Details table, so that the user can select the products from a drop down list. What I am trying to do is make the subform shows all the products as a checkbox so that the user ticks the products that he wants to go with the order instead of having to select them from a combo box, but I am stuck and I don’t know how to do this, any hints ?

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    This may not be the best method. The list could be 200 records long and cannot be connected to the subform,
    and youd need another method to add the checked items to the subform when user is done. (vb code)

    Alternatively, what about a listbox with all products?,
    user dbl-clicks the item, it gets added to the Order subform. (append query)
    a find button to filter the list, instead of scrolling 100s of recs.

    On the Order Form, user clicks Add Products button that opens the pick list form,
    user dbl-clicks item, it runs append query to add it to Order subform (using Order ID below Client Name)
    when all items added, this form closes, and user can adjust the subform (qty , or remove record)
    (see photo)
    Click image for larger version. 

Name:	Charge fees.jpg 
Views:	15 
Size:	24.5 KB 
ID:	34737

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Is this a multi-user split db? Your checkbox idea would require a yes/no field in Products table. Then an INSERT SELECT sql action could save checked products to OrderDetails table. However, simultaneous users will conflict in setting checkbox unless the table with checkbox field is in frontend.

    Ranman suggestion is a common approach and has been discussed numerous times.
    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. Replies: 4
    Last Post: 04-11-2016, 03:08 PM
  2. Replies: 1
    Last Post: 11-26-2014, 02:30 PM
  3. Replies: 12
    Last Post: 11-17-2014, 01:33 PM
  4. Checkbox in mainform to control subform
    By revned12 in forum Forms
    Replies: 3
    Last Post: 09-09-2012, 02:32 AM
  5. Binding a checkbox to a subform
    By Bhat59 in forum Forms
    Replies: 3
    Last Post: 10-20-2011, 08:48 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