Shipper225
Windows XP Access 2007
- Local time
- Today, 09:58
- Joined
- Jun 23, 2011
- Messages
- 69
I am doing this in Access 2007.
I'm having an issue trying to move between records on a set form. The form is linked to a table where each order is created has multiple lines to it. When I try using the buttons I made to move between the records I view duplicate records until I finally get to a different WorkOrderID, I wasn't sure if anyone knew how to make the button jump between WorkOrderID fields instead of moving from record to record.
These are my two codes for next and previous:
I'm having an issue trying to move between records on a set form. The form is linked to a table where each order is created has multiple lines to it. When I try using the buttons I made to move between the records I view duplicate records until I finally get to a different WorkOrderID, I wasn't sure if anyone knew how to make the button jump between WorkOrderID fields instead of moving from record to record.
These are my two codes for next and previous:
Code:
Private Sub ButtonPrevious_Click()
On Error GoTo Err_ButtonPrevious_Click
DoCmd.GoToRecord , , acPrevious
Exit_ButtonPrevious_Click:
Exit Sub
Err_ButtonPrevious_Click:
MsgBox Err.description
Resume Exit_ButtonPrevious_Click
End Sub
Private Sub ButtonNext_Click()
On Error GoTo Err_ButtonNext_Click
DoCmd.GoToRecord , , acNext
Exit_ButtonNext_Click:
Exit Sub
Err_ButtonNext_Click:
MsgBox Err.description
Resume Exit_ButtonNext_Click
End Sub