I believe that an Office update was installed on my work computer this week. Since then I am seeing an error message in a database I built.
PC = Windows 10 Enterprise OS Build 17763.557
Office = 365 ProPlus Version 1808 Build 10730.20348
I have a button on a form that runs a SQL search for a record and populates the form. This code has worked for over a year.
When clicking the button the code fails with the error message
"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."
If I open Visual Basic alongside the form, the query runs without error.
I am not sure if the Office update and the error message are related. I do not believe any changes have been made to the code or database structure. No other error messages have been reported from other users.
Private Sub Command360_Click()
If IsNull(Me.SEARCH_TEXT.Value) Or Me.SEARCH_TEXT.Value = "" Then
MsgBox "Please type in your search keyword.", vbOKOnly, "Keyword Needed"
Me.SEARCH_TEXT.BackColor = vbYellow
Me.SEARCH_TEXT.SetFocus
Else
strsearch = Me.SEARCH_TEXT.Value
Me.SEARCH_TEXT.BackColor = vbWhite
SearchTask = "SELECT * FROM [tMASTER_BOREHOLE_LIST] WHERE ( ([HOLEID] Like ""*" & strsearch & "*"") OR ([TYPE] Like ""*" & strsearch & "*"") OR ([ALTERNATE_NAME1] Like ""*" & strsearch & "*"") OR ([ALTERNATE_NAME2] Like ""*" & strsearch & "*"") OR ([ALTERNATE_NAME3] Like ""*" & strsearch & "*"") OR ([Hole_Location] Like ""*" & strsearch & "*"") OR ([ALTERNATE_NAME4] Like ""*" & strsearch & "*"") OR ([Collar_Site_No] Like ""*" & strsearch & "*"") OR ([Site_ID] Like ""*" & strsearch & "*"") OR ([HOLE_NAME] Like ""*" & strsearch & "*"") OR ([Hole_Number] Like ""*" & strsearch & "*"") OR ([Design_Point_Number] Like ""*" & strsearch & "*"") OR ([STAKED_Point_Number] Like ""*" & strsearch & "*"") OR ([As_Drilled_Point_Number] Like ""*" & strsearch & "*"") OR ([COLLAR_LOCATION1] Like ""*" & strsearch & "*"") OR ([COLLAR_LOCATION] Like ""*" & strsearch & "*"") OR ([LW_FOR_SEALUP] Like ""*" & strsearch & "*""))"
Me.RecordSource = SearchTask
End If
End Sub