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

    GoToRecord acGoTo

    not sure what is wrong

    ID field is stored in varIDPrevious

    if the record is not completed I have it going to

    DoCmd.GoToRecord , , , acGoTo, varIDPrevious

    however I get an error and nothing changes

    the idea is that if you move a record away it will go back to it.

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Nevermind

    I wasn't using me.current record

    Code:
    varIDCurrent = Me.CurrentRecord
    
    
    If varIDCurrent <> varIDPrevious Then
        If IsNull(Me.txtEnterMemo) = False Then
        
        With Me.Recordset
        DoCmd.GoToRecord , , acGoTo, varIDPrevious
        MsgBox "you cannot move to another record until you have entered or cleared the communication memo field"
        End With
    
    
        Else
            varIDPrevious = varIDCurrent
        End If
    End If

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

Similar Threads

  1. Trapping a GoToRecord event.
    By casinc815 in forum Forms
    Replies: 10
    Last Post: 04-10-2014, 01:04 PM
  2. DoCmd.GoToRecord
    By Mtyetti2 in forum Access
    Replies: 3
    Last Post: 11-15-2013, 06:59 AM
  3. GoToRecord Help
    By rayhawk in forum Access
    Replies: 10
    Last Post: 08-30-2010, 12:44 PM
  4. GoToRecord Help!!!!!!
    By Kipster1203 in forum Access
    Replies: 8
    Last Post: 06-11-2010, 11:12 AM
  5. Replies: 0
    Last Post: 03-15-2009, 03:22 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