Results 1 to 4 of 4
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Recordset edit values in fields of each record

    I have

    Code:
                                            rs.Edit
                                            If rs!ConfirmationSent2nd = False Then
                                            rs!ConfirmationSent2nd = True
                                            End If
                                            rs!ConfirmCount2 = rs!ConfirmCount2 + 1
                                            rs!ConfirmDate2 = Date
                                            rs!ConfirmTO2 = Nz(TourOrganiserID, "")
                                            rs.Update
    It updates the bool confirmationsent2nd fine and confirmdate2 but not the other two... can't figure out why.

    confirmCount2 is a number field
    so is confirmTO2

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Don't use "" in the Nz(), use 0 or Null.
    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
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    Don't use "" in the Nz(), use 0 or Null.

    I changed it but I still get a loop break.

    If I quote block out the whole rs.edit -> rs.update then the loop works again.

  4. #4
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    rs.edit
    rs.ConfirmDate2 = Date
    rs.update

    This part works fine

    woops just figured it out sorry June many apologies something very very simple that I forgot to do.

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

Similar Threads

  1. Replies: 8
    Last Post: 09-27-2012, 11:12 AM
  2. Replies: 4
    Last Post: 03-30-2012, 09:45 PM
  3. Cumulative totals: Cannot edit a field in recordset
    By Persist in forum Programming
    Replies: 4
    Last Post: 03-11-2012, 06:38 PM
  4. Edit Data in Recordset
    By Bwilliamson in forum Programming
    Replies: 3
    Last Post: 05-12-2011, 08:29 AM
  5. Replies: 7
    Last Post: 11-13-2010, 08:08 AM

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