DanG
Registered User.
- Local time
- Today, 02:21
- Joined
- Nov 4, 2004
- Messages
- 477
Hello,
The code below opens "frmMSREntry" to a matching "MSRID" field from "frmsearchcentral" and closes "frmsearchcentral". Seems simple enough, but once I'm in the desired MSRID and want to move to the next record I get an error saying I can not move to the specified record. So I am stuck in the current record and can't move forward or back.
Is there anyway to release the grip on the current MSRID?
Thank you in advance
The code below opens "frmMSREntry" to a matching "MSRID" field from "frmsearchcentral" and closes "frmsearchcentral". Seems simple enough, but once I'm in the desired MSRID and want to move to the next record I get an error saying I can not move to the specified record. So I am stuck in the current record and can't move forward or back.
Is there anyway to release the grip on the current MSRID?
Thank you in advance
Code:
Private Sub GoToMSR_Click()
On Error GoTo Err_GoToMSR_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmMSREntry"
stLinkCriteria = "[MSRID]=" & Me![MSRID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmsearchcentral"
Exit_GoToMSR_Click:
Exit Sub
Err_GoToMSR_Click:
MsgBox Err.Description
Resume Exit_GoToMSR_Click
End Sub