general ------- dim d as database dim r as recordset form load -------- set d=opendatabase(app.path &"master.mdb")
command1 -------- 'searching by value ie Numeric set r=d.openrecordset("select * from child where id=" &val(text1.text)) if r.reccount()>=1 then text1.text=r!id text2.text=r!name endif
command2 -------- 'searching by name ie string set r=d.openrecordset("select * from child where name=" '"<irm(text2.text)&"'") if r.reccount()>=1 then text1.text=r!id text2.text=r!name endif toeswr@yahoo.com
Comments
-------
dim d as database
dim r as recordset
form load
--------
set d=opendatabase(app.path &"master.mdb")
command1
--------
'searching by value ie Numeric
set r=d.openrecordset("select * from child where id=" &val(text1.text))
if r.reccount()>=1 then
text1.text=r!id
text2.text=r!name
endif
command2
--------
'searching by name ie string
set r=d.openrecordset("select * from child where name=" '"<irm(text2.text)&"'")
if r.reccount()>=1 then
text1.text=r!id
text2.text=r!name
endif
toeswr@yahoo.com