Results 1 to 4 of 4
  1. #1
    shod90 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2016
    Posts
    134

    Looping through form and insert record

    Dear Gents,
    I have a continuous form that have some items , Every item have check box beside it and linked with field in the table.
    I have a combo box which have all colors for this item and button to submit the change by this sqlstatment "Update items set color = "Green" while checked = -1" , I need to insert in the log table when i change bulk of items using the check box to be link
    Item 1 has been changed to green
    item 2 has been changed to green


    item 3 has been changed to green
    item 4 has been changed to green
    And so on based on how many items i have checked.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    You want to insert what data into log table? Why would you need to loop through form?
    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
    shod90 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2016
    Posts
    134
    Actually i want to inform the admin that user changed some items with their names to be known which item has been changed ,
    This form is my form i have to select the checkbox on what items i want to change its color and then choose from the combobox which in the header the color i want to change then press change..
    Attached Thumbnails Attached Thumbnails log.png  

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Could there be multiple simultaneous users making these edits? If so, they will likely conflict with each other selecting items.

    Could use an INSERT SELECT action to save data to log table.

    Or utilize form RecordsetClone to loop through records of form.
    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: 3
    Last Post: 05-27-2015, 01:04 PM
  2. Looping through fields of a record (query or table)
    By PlamenGo in forum Programming
    Replies: 2
    Last Post: 04-02-2014, 05:44 AM
  3. Replies: 9
    Last Post: 01-31-2014, 12:09 PM
  4. Insert multiple record in sub form
    By tejginas in forum Access
    Replies: 0
    Last Post: 08-15-2012, 11:27 PM
  5. Replies: 2
    Last Post: 06-13-2012, 06:00 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