G
Guest
To help you understand my problem and assist me, I will give an actual
illustration. I have a table that consists of CustomerPhone, Name, Address
etc. The customer Phone is a PK. I have created a form with unbound text
fields. Once a user enters the customer phone and clicks on search it will
bring up existing record from the table. If the record doesn't exist they
will have an option to add that phone number and other details to the
database. But if the record exist then it will pull up the record. Once the
record is displayed the end user can make any changes they want to the record
and click on update. Since this form has unbound text controls, On click
event I run an update query to update the record. Now if a user wants to
change the phone number (the primary key) and if they enter a phone number
that already exists in the database, the system should not update the record
and give error message indicating the record already exists. Below is an
example
Customer Phone
ABC 1234
XYZ 1111
If a user pulls up XYZ record and changes its phone number from 1111 to 1234
the system should give an error. Any help you can provide would be greatly
appreciated.
PS. The key thing to remember is the form consists of unbound controls.
illustration. I have a table that consists of CustomerPhone, Name, Address
etc. The customer Phone is a PK. I have created a form with unbound text
fields. Once a user enters the customer phone and clicks on search it will
bring up existing record from the table. If the record doesn't exist they
will have an option to add that phone number and other details to the
database. But if the record exist then it will pull up the record. Once the
record is displayed the end user can make any changes they want to the record
and click on update. Since this form has unbound text controls, On click
event I run an update query to update the record. Now if a user wants to
change the phone number (the primary key) and if they enter a phone number
that already exists in the database, the system should not update the record
and give error message indicating the record already exists. Below is an
example
Customer Phone
ABC 1234
XYZ 1111
If a user pulls up XYZ record and changes its phone number from 1111 to 1234
the system should give an error. Any help you can provide would be greatly
appreciated.
PS. The key thing to remember is the form consists of unbound controls.