Results 1 to 2 of 2
  1. #1
    clemdawg is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jun 2012
    Posts
    1

    need to check a field for previous record in form

    Hi,



    I have a form based on a table; in the table there is a Yes/No field that I use as a flag to know whether the data was updated. I have 'next record' and 'previous record' command buttons on the form. I want to be able to add code to the 'next record' button that will look at the Yes/No field (flag) for the PREVIOUS record to see if it is set to yes, ie updated and if not, I want a message to pop up saying the previous record was not updated..... I'm not sure how to do that.....

    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,597
    Very tricky.

    Try:

    Me.RecordsetClone.Bookmark = Me.Bookmark
    If Not Me.RecordsetClone.BOF Then
    Me.RecordsetClone.MovePrevious
    If Me.RecordsetClone![fieldname] = False Then MsgBox "Not updated"
    End If
    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: 15
    Last Post: 05-24-2012, 02:36 AM
  2. Replies: 1
    Last Post: 04-25-2012, 11:56 AM
  3. Replies: 4
    Last Post: 09-09-2011, 10:00 PM
  4. Replies: 2
    Last Post: 07-14-2011, 09:23 AM
  5. Populate field from field on previous record
    By randolphoralph in forum Forms
    Replies: 7
    Last Post: 03-04-2011, 11:28 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