It's an annoying, random occurrence, which has no apparent cause.
I have a search tool which opens when the application begins.
It begins with an Open event:
Followed by a Load Event:
I get a message "Please enter Parameter" then it asks for Form!frmSearch!SearchBox
and
Form!frmSearch!SearchBoxHidden
If I click ok, and leave it blank, I get an "on open Event" error.
"The Expression On Open you entered as the Event Property setting produced the following error: "...
I say its random, because i don't change anything then suddenly it will appear. And it wont go unless
a) VBA is open in the background, then everything works
or
b) I Copy and paste all my forms and queries into a fresh access file until it comes back
But I havent changed anything!?:banghead:
I have a search tool which opens when the application begins.
It begins with an Open event:
Code:
Private Sub Form_Open(Cancel As Integer)
Me.SearchBox.Value = Me.SearchBox.ItemData(1)
Me.Requery
End Sub
Followed by a Load Event:
Code:
Private Sub Form_Load()
Me.AZSort.Visible = True
Me.ZASort.Visible = False
TheLocation = ")"
TheSQL = "SELECT * FROM [tblCustomers] " _
& "WHERE (((tblCustomers.[Company Name]) Like ""*"" & [Forms]![frmSearch]![SearchHidden] & ""*"")" & TheLocation & " " _
& "OR (((tblCustomers.Firstname) Like ""*"" & [Forms]![frmSearch]![SearchHidden] & ""*"")" & TheLocation & " " _
& "OR (((tblCustomers.Surname) Like ""*"" & [Forms]![frmSearch]![SearchHidden] & ""*"")" & TheLocation & " " _
& "OR (((tblCustomers.Keyword1) Like ""*"" & [Forms]![frmSearch]![SearchHidden] & ""*"")" & TheLocation & " " _
& "OR (((tblCustomers.Keyword2) Like ""*"" & [Forms]![frmSearch]![SearchHidden] & ""*"")" & TheLocation & " " _
& "OR (((tblCustomers.Keyword3) Like ""*"" & [Forms]![frmSearch]![SearchHidden] & ""*"")" & TheLocation & " " _
& "ORDER BY [CustomerID];"
Me.SearchBox.RowSource = TheSQL
Me.SearchBox.Value = Me.SearchBox.ItemData(1)
Me.Requery
End Sub
I get a message "Please enter Parameter" then it asks for Form!frmSearch!SearchBox
and
Form!frmSearch!SearchBoxHidden
If I click ok, and leave it blank, I get an "on open Event" error.
"The Expression On Open you entered as the Event Property setting produced the following error: "...
I say its random, because i don't change anything then suddenly it will appear. And it wont go unless
a) VBA is open in the background, then everything works
or
b) I Copy and paste all my forms and queries into a fresh access file until it comes back
But I havent changed anything!?:banghead: