Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188

    Form Link CheckBox to Record

    Attached is a sample MDB. I want to use the form frmShipThese to select records via checkboxes. I now have them defaulted to being checked. They should default to being unchecked. My issue is getting them linked to each record, as opposed to all records, as it is now. I want to selectively check boxes, then click the button to update those records in the underlying table.



    I've googled, but not finding anything that makes sense to me. And I'm sure the problem is me. Can anyone shove me in the right direction?

    Thanks!
    Attached Files Attached Files

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    To do what you what you need to bind the checkbox to the ShipThese yes\no field in the source table. An unbound control in a continuous form will behave like you have it now (show the same value for all records). And you will not be able to have the form editable if you are using a totals query as you have it now. So get rid of the totals (group by) and make the control source of the checkbox="ShipThese" and it should work as expected.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    In order for the checkbox to be linked to the record, its control source would need to be set to a field in the table. Note in a multi-user environment this could cause conflicts.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi Shank

    Do you want to filter the records to only show a specific "MustShipFrom" and a specific "Sku", then select the records to be sent?

  5. #5
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    Quote Originally Posted by Gicu View Post
    To do what you what you need to bind the checkbox to the ShipThese yes\no field in the source table. An unbound control in a continuous form will behave like you have it now (show the same value for all records). And you will not be able to have the form editable if you are using a totals query as you have it now. So get rid of the totals (group by) and make the control source of the checkbox="ShipThese" and it should work as expected.

    Cheers,

    Elaborating on what I'm trying to do, I'm using a group query in the form so that I can select, for example, ALL of Sku1 going to GA. If I tied the checkbox and form straight to the table, I'd have to click 19 checkboxes (19 records), correct? With the grouping, I can click 1 checkbox and update all 19 records in the table. What am I missing? Luckily, there will only be one user in the DB at a time.

    Thanks!

  6. #6
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    Quote Originally Posted by mike60smart View Post
    Hi Shank

    Do you want to filter the records to only show a specific "MustShipFrom" and a specific "Sku", then select the records to be sent?
    Yes. Correct. Sku1 going to GA, I would click 1 checkbox and update the underlying table.

    Thanks!

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Unfortunately you cannot do it like that with grouping without using some VBA code as the source becomes not updatable.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  8. #8
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Please have a look at this alternate design.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  9. #9
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    Quote Originally Posted by Gicu View Post
    Please have a look at this alternate design.

    Cheers,
    Excellent! I was just watching a YouTube that was describing a similar way of doing this. This helps a whole bunch!

    Thank you!

  10. #10
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    Quote Originally Posted by Gicu View Post
    Please have a look at this alternate design.

    Cheers,
    Addendum: See attached screenshot. How can I get rid of the blank space in the detail section? It's a waste of screen. I select can grow and can shrink as Yes, but no change.

    Thanks!
    Attached Thumbnails Attached Thumbnails S1.jpg  

  11. #11
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    In the attached I changed your Form to a Split Form.

    Added a Filter in an Unbound Control in the Header of the Form.

    Added the following Code provided by Ling from this https://www.accessforums.net/showthread.php?t=53200

    Now you can search for WV then for SKU1 - Click the Command Button and all required Checkbox's will update
    Attached Files Attached Files

  12. #12
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    Here with Vlad's version modified
    Attached Files Attached Files

  13. #13
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    Quote Originally Posted by mike60smart View Post
    Hi

    Here with Vlad's version modified
    Thank you very much!

  14. #14
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    Quote Originally Posted by mike60smart View Post
    Hi

    Here with Vlad's version modified
    Here again. Oy! Saying I'm a novice to VB would be an understatement. I took your db and starting changing things to suit my needs. I added another hidden text box. Changed names as well, making it make sense for me. The update must be per 3 fields: [NoSkus], [MustShipFrom], [Sku]. I changed the statement in VB and now getting the attached error. The[NoSkus] field is an integer field. I don't know if the statement needs to be changed for integer vs string. I removed some quotes, no difference. Can you take a peek and tell me what I'm doing wrong?

    Thanks again!
    Attached Thumbnails Attached Thumbnails S1.JPG  
    Attached Files Attached Files

  15. #15
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Try this version please.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-05-2017, 08:10 AM
  2. checkbox and Textbox link
    By rebel_yell in forum Access
    Replies: 10
    Last Post: 05-13-2014, 04:46 PM
  3. Link from report to record form
    By John2360 in forum Access
    Replies: 8
    Last Post: 08-13-2013, 01:29 PM
  4. Open Form and Link To Specific Record
    By burrina in forum Forms
    Replies: 2
    Last Post: 12-17-2012, 11:09 PM
  5. Replies: 4
    Last Post: 07-31-2012, 04:33 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