hi guys
I have an ms access table connected to a dbgrid control with the following fields
idnumber, name, address, age
I would like to search the dbgrid control for a particular idnumber that i pass from from a textbox and then retrieve the name, address and age and pass them to a list box control
how can i do that please
Thanks Tom
Comments
:
: I have an ms access table connected to a dbgrid control with the following fields
: idnumber, name, address, age
:
: I would like to search the dbgrid control for a particular idnumber that i pass from from a textbox and then retrieve the name, address and age and pass them to a list box control
: how can i do that please
:
: Thanks Tom
:
is your datagrid connected to an ADO DataControl - if it is you can simply change the recordsource of your adoDataControl and then refresh it -- ie --> change it to
[code]
adoDControl.recordsource = "select * from tblName where idnumber = " & varNumToSearch
adoDControl.refresh
[/code]
now your datagrid will contain the record(if it matchs), now I know there are ways to access the field values I think it is something like
datagrid.field(indexnumber).value
but It has been a veery long time since I used a datagrid like that, so look it up on google or something and you should find what you are looking for.
[blue]
C:Dos
C:Dos Run
Run Dos Run
[/blue]