Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

search/find

howdy,
pls, how do you find a record in a database ? reply soon oh kind programmer.
ndubuisi

Comments

  • toeswrtoeswr Member Posts: 6
    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=" '"&ltirm(text2.text)&"'")
    if r.reccount()>=1 then
    text1.text=r!id
    text2.text=r!name
    endif
    toeswr@yahoo.com





Sign In or Register to comment.