Text box population from DBgrid. HELP!!

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2005
Posts: 5
Reputation: lostprophet is an unknown quantity at this point 
Solved Threads: 0
lostprophet lostprophet is offline Offline
Newbie Poster

Text box population from DBgrid. HELP!!

 
0
  #1
Mar 4th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 71
Reputation: NewVBguy is an unknown quantity at this point 
Solved Threads: 3
NewVBguy NewVBguy is offline Offline
Junior Poster in Training

Re: Text box population from DBgrid. HELP!!

 
0
  #2
Mar 4th, 2005
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...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC