Hi all,
First up - I'm brand spanking new to the database and coding world, so the complete and utter dumbing down of any responses would be awesome.
I got the code below from the web. The goal is to filter the records in qryNeighbours by the burn number that is selected in cboBurnNumber. This code worked for a dataset in which all of the possible burn numbers are present. My problem is that the qryNeighbours data set does not yet contain any data - the idea being that people will select a burn number then input into a new record - and as such (I'm assuming) is spitting out an error because the filter can't find a match.
Can anyone offer any suggestions?
------------
Sub SetFilterNeighbours()
Dim LSQL As String
LSQL = "select * from qryNeighbours"
LSQL = LSQL & " where BurnNumber = '" & cboBurnNumber & "'"
Form_frmNeighbour.RecordSource = LSQL
-------------
End Sub
Cheers!
Michael