Avatar of dave_sky
dave_sky
Flag for United States of America asked on

Populate Textbox values to Textbox from unrelated table

Software vb.net & Sql Server 2005"
I need sample code on how to Populate Textbox value to Textbox from unrelated table?

Thanks!
.NET ProgrammingVisual Basic.NET

Avatar of undefined
Last Comment
Fernando Soto

8/22/2022 - Mon
Fernando Soto

Not enough info. How are you getting the data from the database?
What does this mean, "Populate Textbox value to Textbox from unrelated table?"
What type of application are you developing?
Can you please post the code you are using.
dave_sky

ASKER
Developing a Windows form application using a dataset to access the database.

tblWorkorder has TextboxA to be filled with tblChecklists TextboxB value using buttonclick event.
Fernando Soto

So you are using a DataSet and a DataTable object to organize your data from the database. So your DataTable may have many rows that were returned by the SQL query.

I am assuming that TextboxA and TextboxB are Windows Form TextBox objects placed on the form. I am also assuming that tblWorkorder and tblChecklists are each a DataTable object that are assigned to the DataSet that hold the data from the database. I can not understand what this means, "tblWorkorder has TextboxA to be filled with tblChecklists TextboxB value using buttonclick event.", can you explain this in a bit more detail?
Your help has saved me hundreds of hours of internet surfing.
fblack61
dave_sky

ASKER
You are correct on your assumptions...

I need to copy a value from TextboxA on frmExample1 to TextboxB on frmExample2 with an event.
David Johnson, CD

TextboxB.text = TextboxA.text  doesn't work for you?
ASKER CERTIFIED SOLUTION
Fernando Soto

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
dave_sky

ASKER
Thanks for your help!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Fernando Soto

Not a problem, glad to help.