Hi,
I am having a problem with the code on one of my forms. I have a Payment Entry form which has a drop down box called [Customer]. Each payment entry can have any number of invoices linked to it (the payment entry is a check that can pay any number of invoices.) The customer that is chosen determines the recordsource of the invoice subform.
The invoice subform is filtered by a field called [cleared]. Since cleared is a bound field, I need to find a way to prevent a user from changing the customer once any one invoice is related to that record. If they are permitted to change the customer, an invoice will be incorrectly paid by the wrong customer.
I was thinking that to do this, I would need to search all of the invoices to see if any had the matching invoice payment entry numbers. If so, a messege would pop up and the action would be canceled. I'm not sure if I should do this with a recordsource or how to do so. Any help would be appreciated
I am having a problem with the code on one of my forms. I have a Payment Entry form which has a drop down box called [Customer]. Each payment entry can have any number of invoices linked to it (the payment entry is a check that can pay any number of invoices.) The customer that is chosen determines the recordsource of the invoice subform.
The invoice subform is filtered by a field called [cleared]. Since cleared is a bound field, I need to find a way to prevent a user from changing the customer once any one invoice is related to that record. If they are permitted to change the customer, an invoice will be incorrectly paid by the wrong customer.
I was thinking that to do this, I would need to search all of the invoices to see if any had the matching invoice payment entry numbers. If so, a messege would pop up and the action would be canceled. I'm not sure if I should do this with a recordsource or how to do so. Any help would be appreciated