I have the following tables:
Parent Table:
Table Name: Raw_Data_A
Raw_data_A_ID (PK) Autonumber
LSExpert
Date_of_training
Team_being_trained
Module
Comments
And the following child table:
Table Name: Raw_Data_B
Raw_Data_B_ID (PK) Autonumber
Raw_Data_A_ID
Attendee Name
I have a one to many relationship from Raw_data_A to Raw_Data_B with the Raw_Data_A_ID field being used in the relationship. I.e. 1 Raw_data_A.raw_data_A_id to MANY Raw_Data_B entries
I have one form with a subform on it that has the following:
On the Left - this form populates the parent table (Raw_Data_A)
On the right - I would like this form to be mandatory for each entry on the left hand side. This form will populate the child table on the many side of the relationship (Raw_Data_B)
In essence I would like to have it such that when the user finishes entering the comments on the "parent" side of the form, it should only save to the tables if the user also enters data on the "child" side of the form.
I have tried to create an "Event Procedure on Before Update" on the parent form that reads as follows:
IIf (IsNull [attendee name], "No name enteres. please Enter Name", DoCmd.save)
However this does not seem to work.
If anyone can help or provide some sample code to do this I would be grateful. I'm not a technical person, and have basically been reading up on Access and "Building applications in Access". Sadly they do not seem to provide sample code for this type of thing.
Parent Table:
Table Name: Raw_Data_A
Raw_data_A_ID (PK) Autonumber
LSExpert
Date_of_training
Team_being_trained
Module
Comments
And the following child table:
Table Name: Raw_Data_B
Raw_Data_B_ID (PK) Autonumber
Raw_Data_A_ID
Attendee Name
I have a one to many relationship from Raw_data_A to Raw_Data_B with the Raw_Data_A_ID field being used in the relationship. I.e. 1 Raw_data_A.raw_data_A_id to MANY Raw_Data_B entries
I have one form with a subform on it that has the following:
On the Left - this form populates the parent table (Raw_Data_A)
On the right - I would like this form to be mandatory for each entry on the left hand side. This form will populate the child table on the many side of the relationship (Raw_Data_B)
In essence I would like to have it such that when the user finishes entering the comments on the "parent" side of the form, it should only save to the tables if the user also enters data on the "child" side of the form.
I have tried to create an "Event Procedure on Before Update" on the parent form that reads as follows:
IIf (IsNull [attendee name], "No name enteres. please Enter Name", DoCmd.save)
However this does not seem to work.
If anyone can help or provide some sample code to do this I would be grateful. I'm not a technical person, and have basically been reading up on Access and "Building applications in Access". Sadly they do not seem to provide sample code for this type of thing.