Link to home
Start Free TrialLog in
Avatar of damixa
damixaFlag for Denmark

asked on

How to update 2 tables from one form

Maybe this is an easy question but for some reason I'm struggling with it.

I have the following tables

tbl_main with main_id primary key that holds the bulk of the information
tbl_notes with primary key notes_id that holds just the notes
tbl_main_notesrelationship that holds the foreign keys for both tbl_main and tbl_notes

So when I access a form that holds primarily the information on tbl_main I have a "Add Note" button. When I enter the note, it should update the tbl_notes and also tbl_main_notesrelationship that says that that specific note ID is associated to the tbl_main.id in a one-to-many relationship.

Somehow I cant get my brain to update both of these tables at the same time. Am I overthinking it?

thanks,
Vinnie
Avatar of damixa
damixa
Flag of Denmark image

ASKER

Also another question that came up. Do i need a third table with the relationship to adhere to 3NF principles, or can I instead just have a table that has NoteID, main_id (foreign key) and the note field) Would this be acceptable, doing away with the whole relationship table?
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial