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

Can't Create Form with Header and Detail Tables

Status
Not open for further replies.

pkw25

MIS
Mar 20, 2002
46
IE
Hello

I am new to VB2005 and have used Access in the past. In Access I have created a form and subform connected to header and detail tables respectively whereby both are linked on a common field. If the header form navigator moves to a new field the detail form displays the relavent detail lines.
In VB2005 I can create 2 controls one connects to tblHeader and the other 2 tblDetail. the problem is they are completely independent and I can't figure out howto link them as in Access. Any help on this would be much appreciated.

Pkw
 
It probably is but I think you will need to write some code.


What do you have so far.

Christiaan Baes
Belgium

"My old site" - Me
 
This loads the Form:

Private Sub SITD_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TblDETAILTableAdapter.Fill(Me.DBPDataSet.tblDETAIL)
Me.TblHEADERTableAdapter.Fill(Me.DBPDataSet.tblHEADER)
End Sub

I tried using a form control in the where clause in the
SQL for the FILL method for TblDETAIL. but it looks like the GUI FILL statement has to be pure SQL.

SELECT ID, ID2, CON, PRO, HIGHLIGHT FROM tblDETAIL
WHERE ID = HEADER.IDTextBox

Pkw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top