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
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
I think so, review http://msdn.microsoft.com/en-us/libr...ice.12%29.aspx
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.
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.
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.
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.
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.
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.
Yes thanks, I did but it didn't like it.
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.
Thank you, works brilliantly!!!