Click to See Complete Forum and Search --> : Urgent plzz help
urs
August 28th, 2001, 07:53 AM
Set db = DAO.Workspaces(0).OpenDatabase("rem.mdb", False, False, ";pwd=urs")
Set dt = db.OpenRecordset("Name")
this is how i am opening a database
i dont have data control or ado on my form
when i try to find with the coding
dt.FindFirst ("Jhon")
i get an error message that "not supported by this object"
and when i use this coding
dt.FindFirst = ("Jhon") or dt.FindNext = "Jhon"
i get an error message argument not optional
plzz help me
Cakkie
August 28th, 2001, 07:56 AM
You must specify what you re looking for
dt.FindFirst "Firstname='Jhon'"
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
urs
August 28th, 2001, 08:04 AM
Sorry friend it is giving me same error
"Object not supported for this type of object"
Iouri
August 28th, 2001, 08:27 AM
You can use SQL
sSQL = "select * from Table where name = 'John'"
open recordset dt using this SQL
and if dt.RecordCount = 0 then ' record is not found
otherwise
sName = dt!Name
Iouri Boutchkine
iouri@hotsheet.com
phunkydude
August 28th, 2001, 08:29 AM
Hi, some recordset types do not support the FindXXXX methods.
Try specifying the Recordset to be a Snapshot or Dynaset.
'Replace the dbOpenSnapshot const with dbOpenDynaset as you require
set rsData = db.OpenRecordset(RecordsetSQL , dbOpenSnapshot)
the syntax shown in the previous posting for the find methods is correct.
bhanuprakash
August 29th, 2001, 09:39 AM
write the following code
set rs = db.openrecordset("select * from xyz",dbopendynaset)
then the next find sytax what you have specified is ok this should work.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.