martin wrote:
Please help if you can.
I created a table to relate to another. I believe that I created it
correctly with all the requirements. I even checked my steps out of
a mcGraw 2003 book.
The problem is that the second table with the foreign key does not
create a new record and thus the data is not saved. I know I can add some
code to get this done but I have a perfectly working example that does not
have any code to create a record. I cannot see any difference in this example
an my work. I also tried some code but it did not get any results.
I did set the referential intergrity tick on.
Any help would be appreciated.
So you follow these steps and it still doesn't work?:
1. make sure you include the primary key of your parent table in the
child table. Also, make sure the types are compatible (If your parent
table's PK is an autonumber, use Long integer as the child record's
*foreign* key.)
2. create relationship between child and parent tables.
3. create child form.
4. create parent form, and drop child form into it.
5. check the Master/Child record stuff. It should already be filled
in. If not, select the fields relating the two tables together.
And if you create a parent record, can you add a child record? You can
NOT add a child record (e.g. Invoice Line Item) without first creating
a parent record (e.g. Invoice).