This is the code behind the Event Procedure which is fired after:
a.. a text box asks for an ID number to open an existing record
b.. the open Record button is clicked
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FRM_Support_Call1"
stLinkCriteria = "[Ref]=" & Me![Combo26]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command28_Click:
Exit Sub
Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click
End Sub
And this is the code in the same scenario however this is for a new record where the navigation works
a.. Open New Call button is clicked.
b.. As seen in the code below Macro ("MCR_Opn_Frm_Call") is called. It contains three lines:
- Minimize (the active window)
- Open Form is the next one which opens the form 'FRM_Support_Call1'
- now GoToRecord is the third line (the form 'FRM_Support_Call1' is in the Object prperties of goToRecord )
c.. Now the form opens and the navigation works:
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim stDocName As String
stDocName = "MCR_Opn_Frm_Call"
DoCmd.RunMacro stDocName
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub
This is really bugging me I have spent several hours trying to figure this out now.
TYIA
__________________
Wind is your friend
Matt
Last edited by mat41; January 8th, 2009 at 05:55 PM..
|