G
Guest
I placed the following code behind a list box in my startup switchboard which
opens a specific record in a different form. However, once I'm in the
subsequent form and specified record, I'm not able to access any other
records from within the form. In order for me to use the form properly, I
have to go back out to the switchboard, then use a hyperlink I have set up,
and everything works fine.
Do I need to add something to the code?
Private Sub List42_DblClick(Cancel As Integer)
On Error GoTo Err_List42_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmWorkOrder"
stLinkCriteria = "[tblwoWorkOrder#]=" & "'" & Me![List42] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_List42_DblClick:
Exit Sub
Err_List42_DblClick:
MsgBox Err.Description
Resume Exit_List42_DblClick
End Sub
Thanks!
opens a specific record in a different form. However, once I'm in the
subsequent form and specified record, I'm not able to access any other
records from within the form. In order for me to use the form properly, I
have to go back out to the switchboard, then use a hyperlink I have set up,
and everything works fine.
Do I need to add something to the code?
Private Sub List42_DblClick(Cancel As Integer)
On Error GoTo Err_List42_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmWorkOrder"
stLinkCriteria = "[tblwoWorkOrder#]=" & "'" & Me![List42] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_List42_DblClick:
Exit Sub
Err_List42_DblClick:
MsgBox Err.Description
Resume Exit_List42_DblClick
End Sub
Thanks!