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!

Getting data from a form to a table

Status
Not open for further replies.
Apr 24, 2003
22
GB
Hi,
I am trying to create a contacts database I have created a form with personal details such as Name, Tel, Fax etc and on this form I have included a subform with Location (Address 1, 2, 3 Postcode etc) In order to create 1:M instead of M:M (People may have many locations and locations will have many people)relationships between the tables I have created an in-between table containing just PeopleID and LocationID.
I am having real problems working out how to send the people ID and the Location ID from the form to the In-Between table so as to create a link. I have tried cmd.RunSQL and various statements (INSERT INTO, SELECT INTO)but am having no luck. I have also tried some coding but have hit a proverbial brick wall.
I would greatly appreciate anything anyone could suggest to populate this linking table.
Thanks in advance.





 
You appear to be going the long way around
First open your main form in design mode
Second on the toolbox there is an icon for subforms drop this onto your main form and follow the wizard making sure to link the fields


Hope this helps
Hymn
 
Thankyou Hymn,
I'll give that method a try.
Getting to the stage where I can't see the wood for the trees.
Cheers again
[smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top