Results 1 to 2 of 2

Thread: Run Time Error 3251

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Exclamation

    dim dbsBusiness as database
    dim rstCustomers as recordset
    dim x as string

    set dbsBusiness = opendatabase(Business.mdb)
    set rstCustomers.openrecordset("Customers")

    x=inputbox("enter id")

    rstCustomers.findfirst x 'I am getting run time error
    '3251 for this statement

    rstCustomers.close
    dbsBusiness.close


    'Any help is appreciated
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539

    hmm

    Code:
    dim dbsBusiness as database 
    dim rstCustomers as recordset 
    dim x as string 
    
    set dbsBusiness = opendatabase("Business.mdb") 
    set rstCustomers.openrecordset("Customers") 
    
    x=inputbox("enter id") 
    
    rstCustomers.findfirst x 'I am getting run time error 
    '3251 for this statement 
    
    rstCustomers.close 
    dbsBusiness.close

    you forgot to put " " around business.mdb

    dont know if that has anything to do with it....

    where is how i would do that code

    Code:
    dim dbsBusiness as database 
    dim rstCustomers as recordset 
    dim x as string 
    dim SQL as string
    
    x=inputbox("enter id") 
    set dbsBusiness = opendatabase("Business.mdb") 
    SQL = "SELECT * From Customers Where ID = " & x
    set rstcumsers = dbsbusiness.openrecordset(sql)
    with rstcumsers
        if .eof then
               msgbox "nothing found"
        else
            do something to catch it...
        end if
    end with 
    rstCustomers.close 
    dbsBusiness.close
    [Edited by kovan on 09-27-2000 at 08:47 AM]

Posting Permissions

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



Click Here to Expand Forum to Full Width