how to catch error if no match found?

  • Thread starter Thread starter Jimmy
  • Start date Start date
J

Jimmy

if my SQL is:

SELECT FIRST_NAME FROM TABLE1 WHERE LAST_NAME = 'jones'

id jones does not exist i get the error:

"Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record"

why is this happening and can i fix it easily?
 
Afraid that doesn't tell me anything!

Is the SQL the RecordSource for a form? Is it a RowSource for a combo box or
list box? Are you using it to open a RecordSet in VBA code?
 
yeah im thinking i can check for recordset.EOF and if its true, my "error"
is trapped, if its not true then the recordset contains data and i can do
whatever i want with it. but thanks for your help
 
Glad you have a solution that works for you. In the future, though, it
really would be far better if you gave some details of what you're trying to
do, rather than having us try to read your mind!
 
Back
Top