I don't know if you need this, but the form's On Current is:
Private Sub Form_Current()
Me![txtDocInv] = DLookup("[SumofInvoice Amount]", "[qryInvoicedTD]", "[Docket #]=" & Me![Docket #])
Me![txtEstimate] = DLookup("[SumofTotal]", "[qryEstimates]", "[Docket]=" & Me![Docket #])
End Sub
I'm adding a button that allows the user to switch from this form to the corresponding [docket #] in the original "Project request form". Can you tell me what I am missing in the button's On Click:
Private Sub Command99_Click()
On Error GoTo Err_Command99_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim strWhere As String
strWhere = "[Docket #]=" & Me.txtDocket
stDocName = "Project Request Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command99_Click:
Exit Sub
Err_Command99_Click:
MsgBox Err.Description
Resume Exit_Command99_Click
End Sub
The run-time error is:
Private Sub Form_Open(Cancel As Integer)
Application.SetOption "any part of field", 1
End Sub
??
Thanks
Private Sub Form_Current()
Me![txtDocInv] = DLookup("[SumofInvoice Amount]", "[qryInvoicedTD]", "[Docket #]=" & Me![Docket #])
Me![txtEstimate] = DLookup("[SumofTotal]", "[qryEstimates]", "[Docket]=" & Me![Docket #])
End Sub
I'm adding a button that allows the user to switch from this form to the corresponding [docket #] in the original "Project request form". Can you tell me what I am missing in the button's On Click:
Private Sub Command99_Click()
On Error GoTo Err_Command99_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim strWhere As String
strWhere = "[Docket #]=" & Me.txtDocket
stDocName = "Project Request Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command99_Click:
Exit Sub
Err_Command99_Click:
MsgBox Err.Description
Resume Exit_Command99_Click
End Sub
The run-time error is:
Private Sub Form_Open(Cancel As Integer)
Application.SetOption "any part of field", 1
End Sub
??
Thanks