L
Lance
I have a form, and a subform.
The subform is linked based on 3 "fields" in the main form.
the subform itself also has a many-one relationship with a client list.
So, the form controls one entity (an organization). The subform
controls many entities (clients participating with the organization).
Within the subform, I can assign those clients to the organization,
through a combo box that pulls the clients from a table.
Now, the problem occurs when the end user enters some data into the
subform, but does not select a client, and then tries to leave the
subform. Obviously, since the client id must exist in the client table,
and no clientID has been selected, the database is getting grumpy. It
says "The microsoft Jet database engine cannot find a record in the
table..." yada yada. I understand completely why this does, and must
come up, but my goal is to trap this error, give the user a message to
the effect of "If you do not complete this record, it will not be
entered", and then give them a message box to choose yes or no, and
then if they choose to leave, have access automatically clear the
record and let them continue what they were doing.
Any advice on how to trap this error? If I can do that, then I will be
able to get the rest done on my own, I just don't know where/how the
error is firing.
Thanks,
Lance
The subform is linked based on 3 "fields" in the main form.
the subform itself also has a many-one relationship with a client list.
So, the form controls one entity (an organization). The subform
controls many entities (clients participating with the organization).
Within the subform, I can assign those clients to the organization,
through a combo box that pulls the clients from a table.
Now, the problem occurs when the end user enters some data into the
subform, but does not select a client, and then tries to leave the
subform. Obviously, since the client id must exist in the client table,
and no clientID has been selected, the database is getting grumpy. It
says "The microsoft Jet database engine cannot find a record in the
table..." yada yada. I understand completely why this does, and must
come up, but my goal is to trap this error, give the user a message to
the effect of "If you do not complete this record, it will not be
entered", and then give them a message box to choose yes or no, and
then if they choose to leave, have access automatically clear the
record and let them continue what they were doing.
Any advice on how to trap this error? If I can do that, then I will be
able to get the rest done on my own, I just don't know where/how the
error is firing.
Thanks,
Lance