Consulting

Results 1 to 2 of 2

Thread: Error Checking for EOF / BOF Debug

  1. #1

    Error Checking for EOF / BOF Debug

    Hi there,

    I am trying to transmit data to and from an Excel worksheet to an ".mdb" file. However if I try and recall a record from the file to excel where the primary key doesn't exist, I get a EOF BOF debug.

    I want to put in an IF statement that will firstly check if the record exists in the table before it trys to return it.

    How can I do this? I think I have to check if EOF BOF is true but I don't know how to write the syntax, can anyone help?

    Andy

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Just create a query to read it first, if you get EOF on that recordset, it doesn't exist.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •