hi there,
i ve got a visual basic project that is being linked to an access database.
i ve already got a search function working to populate text box's with the information from one table in the relational access database. i am using the ADODC control to connect to the database. what i have got now is a DBgrid control on there to display the information from another table in the database.

What i want to do is for the DBgrid to populate another set of text box's with the information that is related to the information that i searched for, using the ID number as the foreign key in the table that populates the Dbgrid.

sorry if this doesnt make sense but i have tried to explain it as best i can.
please any help would be good or any suggestions for that matter.

Thanx alot people :)

Hi,
i don't know if this what you need. Assuming you have text1 you can do like this:

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
text1=adodc1.recordset("name")

End Sub

What this do is it will populate the text1 everytime you change your row.
hope it will help.

NewVBguy...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.