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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting different database tables

Status
Not open for further replies.

gulky2002

IS-IT--Management
Nov 21, 2002
13
AT
I like to connect some tables stored in an MS Access database to textboxes, checkboxes and comboboxes. Connecting the main information (first table) in the database, which is related to entries in a combobox (second table) works well, but how can I bind a third table to a textbox, updating with the others when clicking the next or previous button? When using the next or previous button the dataset should change in all textboxes. How is the code to realize this? The same problem I have with checkboxes. How is the code binding yes/no data from a fourth table to checkboxes in the GUI?

MANY, MANY THANKS FOR YOUR HELP !!!
with regards
Hermann

Private Sub Form_Load()

Set eventhandler = New dBEvent 'eventhandler is a class module
Set bindCol = New BindingCollection

'Binding the main recordset to a textbox
With bindCol
Set .DataSource = eventhandler.rstStructuralIndicator
.Add txtStrucShortName(0), "Text", "struc_short_name"
.Add txtStrucFullName(0), "Text", "struc_full_name"

End With

'Binding a DataCombo to the main recordset

With dbcCategory
Set .DataSource = eventhandler
.DataMember = "STRUCTURAL_INDICATOR"
.DataField = "struc_indicator_id" 'Der Bezug zum Primärschlüssel
.RowMember = "INDICATOR_CATEGORY"
Set .RowSource = eventhandler 'this is a class module
.BoundColumn = "struc_category_id"
.ListField = "category"
End With

a) HOW TO REALISE TO CONNECT A THIRD TABELE IN THE DATABASE TO A CHECKBOX? IS THE CODE FOR OPTIONBUTTONS THE SAME?

b) HOW TO REALISE TO CONNECT ANOTHER SECOND TEXTBOX WITH DATA FROM A FOURTH TABLE IN THE DATABASE?


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top