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
[Edited by kovan on 09-27-2000 at 08:47 AM]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




Reply With Quote