Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting fields with data

Status
Not open for further replies.

RickLiebespach

Programmer
Sep 29, 2003
85
US
I'm totally new to VB.Net (I have some VFP background)
I have created a form/screen that respresents the UI I want, and I've created an Access database that contains some test data.

The problem I'm having is
how do I associate the fields on my form with the data in the tables of my database?

I've placed an odbcConnection on my form, but I still can't figure out how to associate the
Omnia_Act.Contacts.Company data with the
frmOmnia_Act_Top.txtCompany field on my form.

TIA,

Rick Liebespach
 
Rick

Assuming you have a textbox on the form called say textbox1

textbox1.DataBindings.Add("Text", dt, "field_name")

dt - is in my case a Datatable
"field_name" is a column name in my table.



Sweep
...if it works dont mess with it
 
I you set up the conn/adapter/dataset with the IDE, then bind the dataset field to the text box(the same way)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top