sawilliams
Technical User
I have a form that has a control button. The button's Event Procedure turns off warnings, saves the record, runs an append query and previews a report. It ran without errors yesterday. Today, I modified a table to add some new fields and then added those controls to the form (they were not added to the Query criteria or Report output -- just to the form). Now, when I run the Event Procedure, I get this error:
The expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.
The expression in question is below. Don't know how to proceed.
The expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.
The expression in question is below. Don't know how to proceed.
Code:
Private Sub cmdAppendRequest_No_Click()
On Error GoTo Err_cmdAppendRequest_No_Click
Dim stDocName As String
Dim stDocName2 As String
stDocName = "aqryRequest_ID_Out"
stDocName2 = "rptRequestOut"
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.OpenReport stDocName2, acPreview
Exit_cmdAppendRequest_No_Click:
Exit Sub
Err_cmdAppendRequest_No_Click:
MsgBox Err.Description
Resume Exit_cmdAppendRequest_No_Click
End Sub