Imprrests
and the second is called ]IprestsPays
. There is an Imprest_ID
column that is primary key in [icode]Imprests[/code] table and foreign key in ImprestsPays
tableImprests
table consists the following columns: Expand|Select|Wrap|Line Numbers
- Imprest_ID, Impres_value, Imprest_date, Employee_ID
ImprestsPays table consists the following columns:
Expand|Select|Wrap|Line Numbers
- ID, Payment_value, Payment_date, Imprest_ID
buttonadd_click
event in Imprsts form.I want to prevent user from insert any new imprest for employee in Imprests table if employee haven't paid all payments in ImprestsPays table for old imprest
How can I solve this problem?
What is the code to do that?