Sometimes I get the below error message when I open a form; I can't figure out what causes it; I have to close, compact db, and reopen until it goes away.
To highlight my row, I am using:
txtCurrentRecord =
txtBackground = IIf([EventID]=[txtCurrentRecord],String$(200,"g"),"")
Here is the code on that form:
Any suggestions on getting rid of this problem?
The expression On Click you entered as the event property setting produced the following error: Object or class does not support the set of events.
- The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
- There may have been an error evaluating the function, event, or macro.
To highlight my row, I am using:
txtCurrentRecord =
txtBackground = IIf([EventID]=[txtCurrentRecord],String$(200,"g"),"")
Here is the code on that form:
Code:
Private Sub Form_Current()
On Error GoTo ErrorHandler
Me!txtCurrentRecord = Me!EventID
CleanUpAndExit:
Exit Sub
ErrorHandler:
Call MsgBox("An error was encountered" & vbCrLf & vbCrLf & _
"Description: " & Err.Description & vbCrLf & _
"Error Number: " & Err.Number, vbCritical, gstrAppTitle)
Resume CleanUpAndExit
End Sub
Private Sub Form_Load()
On Error GoTo ErrorHandler
DoCmd.MoveSize 4480, 1460
If Not IsNull(Forms!frmViewEventHistoryList!ActivityType) Then
Me!txtAppls = ActivityTotal(1)
Me!txtAttachments = ActivityTotal(2)
Me!txtConductJobFair = ActivityTotal(3)
Me!txtCallsIncoming = ActivityTotal(19)
Me!txtCallsOutgoing = ActivityTotal(20)
Me!txtConductInterviews = ActivityTotal(8) + ActivityTotal(9) + ActivityTotal(10) + ActivityTotal(11)
Me!txtMeeting = ActivityTotal(16)
Me!txtNotes = ActivityTotal(17)
Me!txtEvaluations = ActivityTotal(18)
Me!txtPhoneSurvey = ActivityTotal(21)
Me!txtPrep = ActivityTotal(22)
Me!txtReceived = ActivityTotal(4) + ActivityTotal(6) + ActivityTotal(14)
Me!txtCVS = ActivityTotal(23)
Me!txtSearchedOnline = ActivityTotal(24)
Me!txtSends = ActivityTotal(5) + ActivityTotal(7) + ActivityTotal(15)
Me!txtTesting = ActivityTotal(25)
Me!txtToDos = ActivityTotal(27)
Me!txtTraining = ActivityTotal(28)
End If
CleanUpAndExit:
Exit Sub
ErrorHandler:
Call MsgBox("An error was encountered" & vbCrLf & vbCrLf & _
"Description: " & Err.Description & vbCrLf & _
"Error Number: " & Err.Number, vbCritical, gstrAppTitle)
Resume CleanUpAndExit
End Sub
Any suggestions on getting rid of this problem?