how to create form\subform

catcoota

Registered User.
Local time
Today, 14:00
Joined
Aug 22, 2003
Messages
30
Hi

I have a basic question related to database child-forms

If I have 2 tables, one called tblorder (orderID, productID, date) and another one called tblproducts (productID, ProductName, Category) and they are linked throuh 1:M relationship (one order could have multiple products)
I want someone to teach me how to create a form (orders) with a subform (products) where I create a new order , in other words, I want to enter data from in the form and the subform without problems,,, I hope someone could explain it step by step!
 
First you need to create a 3rd table to store the one-to-many relationship between Orders and Products. For example if OrderID = 1 has 2 orders then the table will show OrderID =1, ProductID = 1, OrderID =1, ProductID = 2.

Attach is a quick and dirty sample db showing you the basics.
 

Attachments

Lynn_AccessUser


Thanks a lot for the example, i got the idea

Pat Hartman

I've just seen the database, & i liked the idea but i couldn't apply it in my database i don't know why?

I noticed that Order table in north wind is linked to Order details thru 1:M relation ship where both fields are primary keys of 2 of the tables, but I could't do the same in my database! i get a 1:1 relationship although i set all the properties just exactly like the properties of the northwind table

Can anyone help me?
 

Users who are viewing this thread

Back
Top Bottom