masoud_sedighy
Registered User.
- Local time
- Today, 04:40
- Joined
- Dec 10, 2011
- Messages
- 132
Hello
In previous design of my db as I describe like below I was running 3 append queries [FONT="]regularly[/FONT] (by 1 macro) for inserting records in my tables after extracting data by queries (3 simplequery) from 1 base table that comes from imported excel file in my database.
Now I have changed design of my tables to the new ones like below and I wanted to use auto number fields as primary and foreign key of tables. Now I do not know how I have to make my append queries from base table and inserting records to these 3 new tables. Specially for table 3 (new) because I do not know docid,tranid?
Please help.
Best regards.
[FONT="]I have 3 tables.[/FONT]
[FONT="]Table 1:[/FONT]
[FONT="]Doc no (Primary Key) text (50) [/FONT]
[FONT="]Title text (100)[/FONT]
[FONT="]Originator text[/FONT]
[FONT="]-------------------------------------------------[/FONT]
[FONT="]Table 2:[/FONT]
[FONT="]Trans no (Primary Key) text (15)[/FONT]
[FONT="]Date date[/FONT]
[FONT="]----------------------------------------------[/FONT]
[FONT="]Table 3:[/FONT]
[FONT="]Doc no (Foreign key) text (50)[/FONT]
[FONT="]Trans no (Foreign key) text (15)[/FONT]
[FONT="]Size text[/FONT]
[FONT="]Base table (import from excel file)[/FONT]
[FONT="] [/FONT]
[FONT="]Doc no[/FONT]
[FONT="]Trans no[/FONT]
[FONT="]Title[/FONT]
[FONT="]Originator[/FONT]
[FONT="]Date[/FONT]
[FONT="]------------------------------------------[/FONT]
[FONT="] [/FONT]
[FONT="]New design[/FONT]
[FONT="] [/FONT]
[FONT="]Table 1 (new):[/FONT]
[FONT="]Doc id (Primary Key) auto number[/FONT]
[FONT="]Doc no text (50) required (yes) no duplicate[/FONT]
[FONT="]Title text (100)[/FONT]
[FONT="]Originator text[/FONT]
[FONT="]--------------------------------------------------------[/FONT]
[FONT="]Table 2 (new):[/FONT]
[FONT="]Transid (Primary Key) auto number[/FONT]
[FONT="]Trans no text (15) required (yes) no duplicate[/FONT]
[FONT="]Date date[/FONT]
[FONT="]------------------------------------------------------------[/FONT]
[FONT="] [/FONT]
[FONT="]Table 3 (new):[/FONT]
[FONT="]Doc id (Foreign key) auto number required (yes)[/FONT]
[FONT="]Trans id (Foreign key) auto number required (yes)[/FONT]
[FONT="]Doc no text(50) required (yes)[/FONT]
[FONT="]Trans no text (15) required (yes)[/FONT]