I have a problem with related tables.
Button 1: When you click the "Add" button, it does not automatically fill out the foreign key. However, you can cancel the form at any time, so it will not be saved in the database.
Button 2: This button automatically relates the record to the parent table. However, if you do not fill out the Mailing Address and Source fields, the record is still saved in the database. Therefore, if you accidentally press the "Add Record" button, you will need to delete it manually.
Questions:
- How can I fill out the foreign key in Button #1?
- If I use Button #2, how can I prevent the app from saving the data in the database if I haven't filled out the Mailing Address and Source fields?