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!

VB 6.0 and Access DB multiple table question

Status
Not open for further replies.

slurpee7

IS-IT--Management
Apr 30, 2003
6
US
I am writing an application that has multiple fields, data combo's, etc. that all tie into the ADODC object within VB. In the Access database I have a few tables. A couple of the tables don't need to be altered, for example a table with all of the 'States' doesn't, the Main table needs to be altered. There is only one form in the VB application, but all the data needs to be displayed, accessed, saved and altered from this one form. I have created a relationship within Access to the tables as a one-to-many from the 'States' to the main table.
My problem is trying to create a binding, sort-of-speak, within the appilication. Does anyone know what properties I would use to display the actual 'State' (in this case) and have it save to the StateID main table?
 
I think this might be a better description of the issue:
I have a form containing a data combo control, two
adodc data controls and some text boxes. What I want to
do is have the user select an item from the combo box
and have the text boxes fill with the information from
the related records. Basically, the 'state' table and data in the state cobmo box doesnt need to change but needs to be related to the Main table (which holds customer information)

On the form I have Adodc1 and AdodcStates which both corrolate to the appropriate Access tables.

The state datacombo box is set as follows:

rowsource is set to adodcstate
listField is StateAbbr
datasource is AdodcStates
datafield is StateAbbr
BoundColumn is StateID

How can I get the text boxes to update to the correct
adodc1 record and the adodcstate combobox to update, but show the actual State name (not the ID) but be bound to the adodc1?

I am using VB6 with SP5.
Thanks much. Hopefully that helps a bit more
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top