I have a form (continuous) that displays a series of truck loads that is used for billing verification. Two of the text boxes have DblClick Subs that take you to either the frmBillOut (to finalize the billing) or the frmOrderDetail (to edit the billing method). The “logic” behind this is that the frmBillOut is a very small form with limited info, and the frmOrderDetail is a full screen form with all of the data associated with the load (very intense). The first Sub is for the frmBillOut and works just fine:
Private Sub PRONo_DblClick (Cancel As Integer)
On Error GoTo Err_ViewOrder_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = “frmBillOut”
stLinkCriteria = ” [ProNo] =” & Me! [ProNo]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_ViewOrder_Click:
Exit Sub
Err_ViewOrder_Click:
MsgBox Err.Description
Resume Exit_ViewOrder_Click
End Sub
__________________________________________________________________________
The second Sub is for frmOrderDetail, and returns the error mess “The OpenForm action was canceled”. Here it is:
Private Sub Release1No_DblClick (Cancel As Integer)
On Error GoTo Err_ViewOrder_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = “frmOrderDetail”
stLinkCriteria = ” [Release1No] =” & Me! [Release1No]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_ViewOrder_Click:
Exit Sub
Err_ViewOrder_Click:
MsgBox Err.Description
Resume Exit_ViewOrder_Click
End Sub
I can’t see the difference between the two statements, but the second one returns the error message nevertheless. I DID place a cmdButton on the form with the same frmOrderDetail criteria and it works just fine, but I don’t want another cmdButton on the form. Anybody got any clues?