2
2nd_Stage_User
I am unable to add new records to Form I created.
The Form was created from the fields of 4 tables, using the Form Wizard.
After completing data entry for first record, and then clicking "add a new
record" button, I get a "You cannot add or change a record because a related
record is required in table 'Main'" pop-up message.
I've done sufficient testing of the "problem Form" to see exactly what's
causing the problem, but I don't know how to fix what I see. Before telling
exactly what I see, I'll provide brief description of pertinent details of
database.
The database consists of 4 tables: Main, Details, Author, and Subject. The
primary key of the Main table is the foreign key in each of the 3 other
tables. In the Main table, the primary key (PageID) is assigned the
"Autonumber" data type (Long Integer). In the other 3 tables, the foreign
key (PageID) is assigned the "Number" data type (Long Integer).
Now, on to exactly what I see. As I complete data entry for fields from 2nd
table, and begin data entry for fields from 3rd table, the value of foreign
key field from 2nd table switches from correct value to value of "0" (zero).
(The "correct value" of foreign key field from 2nd table was "automatically
generated," after completing data entry for fields from 1st table, and during
data entry for fields from 2nd table.)
Likewise, as I complete data entry for fields from 3rd table, and begin data
entry for fields from 4th table, the value of foreign key field from 3rd
table also switches from correct value to value of "0" (zero). (The "correct
value" of foreign key field from 3rd table was "automatically generated,"
after completing data entry for fields from 2nd table, and during data entry
for fields from 3rd table.)
Any ideas why the "4-table" Form generates the "switching values?"
When I create a Form utilizing only 2 of the 4 tables, I am able to
successfully add new records.
The Form was created from the fields of 4 tables, using the Form Wizard.
After completing data entry for first record, and then clicking "add a new
record" button, I get a "You cannot add or change a record because a related
record is required in table 'Main'" pop-up message.
I've done sufficient testing of the "problem Form" to see exactly what's
causing the problem, but I don't know how to fix what I see. Before telling
exactly what I see, I'll provide brief description of pertinent details of
database.
The database consists of 4 tables: Main, Details, Author, and Subject. The
primary key of the Main table is the foreign key in each of the 3 other
tables. In the Main table, the primary key (PageID) is assigned the
"Autonumber" data type (Long Integer). In the other 3 tables, the foreign
key (PageID) is assigned the "Number" data type (Long Integer).
Now, on to exactly what I see. As I complete data entry for fields from 2nd
table, and begin data entry for fields from 3rd table, the value of foreign
key field from 2nd table switches from correct value to value of "0" (zero).
(The "correct value" of foreign key field from 2nd table was "automatically
generated," after completing data entry for fields from 1st table, and during
data entry for fields from 2nd table.)
Likewise, as I complete data entry for fields from 3rd table, and begin data
entry for fields from 4th table, the value of foreign key field from 3rd
table also switches from correct value to value of "0" (zero). (The "correct
value" of foreign key field from 3rd table was "automatically generated,"
after completing data entry for fields from 2nd table, and during data entry
for fields from 3rd table.)
Any ideas why the "4-table" Form generates the "switching values?"
When I create a Form utilizing only 2 of the 4 tables, I am able to
successfully add new records.