We help IT Professionals succeed at work.

Populate Textbox values to Textbox from unrelated table

55 Views
Last Modified: 2015-10-19
Software vb.net & Sql Server 2005"
I need sample code on how to Populate Textbox value to Textbox from unrelated table?

Thanks!
Comment
Watch Question

Fernando SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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.

Author

Commented:
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 SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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?

Author

Commented:
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, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
TextboxB.text = TextboxA.text  doesn't work for you?
Retired
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks for your help!
Fernando SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Not a problem, glad to help.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.