I have a form where I insert data into two tables:
reservations
and clients (which its primary key is clientid )
(each reservation has one client .the linking field is clientid)
In order to insert new reservations I built a form where the user inserts the reservation data (including clientid )
and a sub form where the user inserts the client data.
When the user inserts the clients data he inserts it in the subform unless the client already exists, in that case he types the clientid in a textbox in the main form and the details of the client in the sub form automatically appear.
If the user tries to insert an existing client into the sub form an error message appears:
"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. (Error 3022)"
I would like to avoid the duplicate work the user has to do and enable him to insert the client data through the sub form solely (new and existing clients as well). How is it possible?
reservations
and clients (which its primary key is clientid )
(each reservation has one client .the linking field is clientid)
In order to insert new reservations I built a form where the user inserts the reservation data (including clientid )
and a sub form where the user inserts the client data.
When the user inserts the clients data he inserts it in the subform unless the client already exists, in that case he types the clientid in a textbox in the main form and the details of the client in the sub form automatically appear.
If the user tries to insert an existing client into the sub form an error message appears:
"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. (Error 3022)"
I would like to avoid the duplicate work the user has to do and enable him to insert the client data through the sub form solely (new and existing clients as well). How is it possible?