Results 1 to 10 of 10
  1. #1
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91

    Viewing Continuous forms

    Hi


    I would be grateful if anyone can throw any light on this.
    I have a continous form that shows 4 records at a time, is it possible to code buttons that move forward and back to the next 4 instead of clicking through each record?

    Thank you

  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,816
    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
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thank you, I have had a look but it seems to take me to a specific record where really all I want to do is jump to the next 4 records in the selection, for instance the next 4 out of 73.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    You can use VBA to duplicate moving from current record to last record or current record to previous.

    The following is to go to the last record.

    DoCmd.GoToRecord , , acLast


    Not sure what you are trying to accomplish. If you want to go to a specific record within a recordset you will need to go after a specific criteria. If the criteria is the fourth record within a sort order that is dynamic because the user can change it, you will have to loop through the records and cout them. Then once you arrive, you can retrieve the criteria.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Show the code you used. Did you use acNext with the offset argument? It works for me.

    Be aware, this will probably generate an error if record pointer is closer than 4 records to the end of the recordset. One possible way to handle:

    If Me.CurrentRecord < Me.Recordset.RecordCount - 4 Then
    DoCmd.GoToRecord , , acNext, 4
    End If
    Last edited by June7; 10-03-2013 at 12:37 PM.
    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.

  6. #6
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thank you for your advice, thanks to I am nearly there, however it is jumping to the 5th last record with this code

    [DoCmd.GoToRecord acDataForm, "Functional Skills Entry Level", acGoTo, Me.Recordset.RecordCount - 5]

    In other words, instead of jumping to record 5 and then 10, its going straight to records 68 of the 73 records.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    That code is working properly, just not what you want.

    Did you try the acNext example I gave?
    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.

  8. #8
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Yes thanks, I did but it didn't like it.

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Why not, what happens, error message, wrong results, nothing?

    Might help if I posted the correct syntax. Don't know how I got that copy/paste messed up. I fixed the earlier post as well.

    DoCmd.GoToRecord , , acNext, 4
    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.

  10. #10
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thank you, works brilliantly!!!

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

Similar Threads

  1. Clone data in continuous forms
    By maddoctor in forum Forms
    Replies: 3
    Last Post: 11-19-2012, 11:57 AM
  2. Replies: 1
    Last Post: 03-15-2012, 02:21 PM
  3. Suppress new record on continuous forms
    By ajetrumpet in forum Forms
    Replies: 0
    Last Post: 09-07-2010, 09:30 PM
  4. Replies: 2
    Last Post: 10-16-2009, 02:47 PM
  5. Replies: 3
    Last Post: 09-06-2008, 10:19 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