Employee database :I have a table containing the following
ID ( Primary Key)
First Name
Last Name
Department
Second table where I enter details of the leaves that they take
Absence Records(Primary Key)
ID(Foreign key)
First and Last Name key (I combine these two in a separate query)
Type of Leave Taken
Number of hours of leave taken
Date on which leave was taken
The two have a one to many relationship
My issue is when I try to insert data from the subform into the Absence table it gives me a message saying No such record present in Agent master table . Is it due to the fact that in the master table the names are separately stored as First Name and Last Name? where as In the subform for entering the leaves I have it autopopulating a combo box.
Eventually I ended up changing the relationship and unchecking enforce referential integrity and it let me insert it.
Please guide me . Am i following the best approach by using a query to concatenate the first and last name and autopopulate the combox ?
Should I use kind of procedure to update the master table with the concatenated string right at the outset ?
Moses
ID ( Primary Key)
First Name
Last Name
Department
Second table where I enter details of the leaves that they take
Absence Records(Primary Key)
ID(Foreign key)
First and Last Name key (I combine these two in a separate query)
Type of Leave Taken
Number of hours of leave taken
Date on which leave was taken
The two have a one to many relationship
My issue is when I try to insert data from the subform into the Absence table it gives me a message saying No such record present in Agent master table . Is it due to the fact that in the master table the names are separately stored as First Name and Last Name? where as In the subform for entering the leaves I have it autopopulating a combo box.
Eventually I ended up changing the relationship and unchecking enforce referential integrity and it let me insert it.
Please guide me . Am i following the best approach by using a query to concatenate the first and last name and autopopulate the combox ?
Should I use kind of procedure to update the master table with the concatenated string right at the outset ?
Moses