J
JOSEPH YOONG
I have forms, queries,macros, VB6, etc being created in MS
Access XP.
However, the tables are all created in SQL SErver 2000
Databases systems.
In order for my MS Access XP application to work, I linked
this Access DB to all the tables in SQL Server 2000 via
ODBC connection via DSN.
The above works fine, no problem.
When I insert a duplicate record, the ODBC will give an
error message to the users which looks something like as
shown below :
[Microsoft][ODB SQL Server Driver][SQL Server] violation
of PRIMARY KEY constraint 'aaaaaA10 Salutation_PK'. Cannot
insert duplicate key in object 'A10 Salutation'. (#2627)
[Microsoft][SQL Server Driver][SQL Server] The statement
has been terminated. (#3621)
I want you advise on how I can capture this error and then
display to users of my system a friendlier message such as
"Sorry! You have entered a duplicate record. Please rekey
the data again"
Can anyone lend me some advise??
Thanks
Access XP.
However, the tables are all created in SQL SErver 2000
Databases systems.
In order for my MS Access XP application to work, I linked
this Access DB to all the tables in SQL Server 2000 via
ODBC connection via DSN.
The above works fine, no problem.
When I insert a duplicate record, the ODBC will give an
error message to the users which looks something like as
shown below :
[Microsoft][ODB SQL Server Driver][SQL Server] violation
of PRIMARY KEY constraint 'aaaaaA10 Salutation_PK'. Cannot
insert duplicate key in object 'A10 Salutation'. (#2627)
[Microsoft][SQL Server Driver][SQL Server] The statement
has been terminated. (#3621)
I want you advise on how I can capture this error and then
display to users of my system a friendlier message such as
"Sorry! You have entered a duplicate record. Please rekey
the data again"
Can anyone lend me some advise??
Thanks