Results 1 to 4 of 4
  1. #1
    Hamm is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    27

    Update Query to Check all Checkboxes in form

    Hi



    I am trying to create an update query to check a checkbox for all the records in a form.

    The form is created using a query to filter a table and I dont want the update query to check all checkboxes in the table, I only want the records that get filtered into the form to be updated.

    When i tried to base the update query on the filter query and run it, it comes up with a message box that says you are about to update zero rows. I assume this is something simple that I am missing.

    Any help much appreciated.

    Hamm

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Run an UPDATE query against the table and use the same filter criteria as the form RecordSource.

    Post the query SQL statement for analysis.

    Review:
    https://www.accessforums.net/access/...umn-29629.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.

  3. #3
    Hamm is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    27
    Hi June7

    I can't seem to get it to work. To get to the "Buyers for Final List" form I run a set of sequential queries to filter from the table "Contacts". The last filter is the record source of the form, it is called StatusFilter

    here is the SQL i have

    UPDATE (([Buyers for Final List] INNER JOIN Contacts ON [Buyers for Final List].ID = Contacts.ID) INNER JOIN StatusFilter ON Contacts.ID = StatusFilter.ID) INNER JOIN TenureFilter ON Contacts.ID = TenureFilter.ID SET TenureFilter.[Use in Report?] = True
    WHERE (((TenureFilter.Status) Like IIf([Forms]![Home Screen]![ActiveFilter]=True,"Active") Or (TenureFilter.Status) Like IIf([Forms]![Home Screen]![InactiveFilter]=True,"Inactive") Or (TenureFilter.Status) Like IIf(([Forms]![Home Screen]![InactiveFilter]=False) And ([Forms]![Home Screen]![ActiveFilter]=False),"*")));

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Why doesn't it work - error message, wrong results, nothing happens?

    I am not familiar with your database so no idea why this query doesn't work. Possibly it is not an updatable query because of the table/query joins.
    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. Checkboxes not displaying properly in form
    By swavemeisterg in forum Forms
    Replies: 3
    Last Post: 06-01-2012, 01:33 PM
  2. Replies: 4
    Last Post: 07-12-2011, 09:49 AM
  3. Issue with Counts of Checkboxes in Query
    By JamiB1979 in forum Queries
    Replies: 3
    Last Post: 06-29-2011, 02:41 AM
  4. Form queries. Multiple checkboxes.
    By radink in forum Queries
    Replies: 4
    Last Post: 04-27-2011, 07:34 AM
  5. Disable Checkboxes for a row in Form
    By seshan in forum Programming
    Replies: 1
    Last Post: 02-05-2010, 07:36 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