bleakhouse
New member
- Local time
- Today, 21:26
- Joined
- Mar 7, 2019
- Messages
- 14
Hi
I think that I have asked this question before but I cannot find or remember the solution. I hope that someone can point me in the right direction.
I have a query to find items in a table, my form and the sub-form is created from a query as I have used may times before by copying the code.
This time it does not work and gives an error message, I have listed the code and error below.
Any help would be gatefully recieved.
Dim SQL As String
Dim SearchItem As String
Dim RecsetLI As Recordset
InitialSearch:
SearchItem = InputBox("Enter Item to search for")
SearchItem = Item + "*"
SelectItem:
SQL = "SELECT * from libraryitems where SearchItem like '" & Item & "'"
Me.dataDisplaySubform.Form.RecordSource = SQL
Me.dataDisplaySubform.Requery
Me.dataDisplaySubform.Visible = True
Me.SelectR.Visible = True
Exit Sub
The form is a standard form with a button and the sub-form is made by dropping the query onto the form in design mode.
The error message states Compile error, method or data member not found
Thanks in anticipation
Regards
Ian Clegg
I think that I have asked this question before but I cannot find or remember the solution. I hope that someone can point me in the right direction.
I have a query to find items in a table, my form and the sub-form is created from a query as I have used may times before by copying the code.
This time it does not work and gives an error message, I have listed the code and error below.
Any help would be gatefully recieved.
Dim SQL As String
Dim SearchItem As String
Dim RecsetLI As Recordset
InitialSearch:
SearchItem = InputBox("Enter Item to search for")
SearchItem = Item + "*"
SelectItem:
SQL = "SELECT * from libraryitems where SearchItem like '" & Item & "'"
Me.dataDisplaySubform.Form.RecordSource = SQL
Me.dataDisplaySubform.Requery
Me.dataDisplaySubform.Visible = True
Me.SelectR.Visible = True
Exit Sub
The form is a standard form with a button and the sub-form is made by dropping the query onto the form in design mode.
The error message states Compile error, method or data member not found
Thanks in anticipation
Regards
Ian Clegg