tweetysamm
New member
- Local time
- Tomorrow, 04:49
- Joined
- Nov 22, 2004
- Messages
- 6
Everyone,
I need some help here. currently i have
table : customer
primary key : account number
button : New Record embedded with this code
DoCmd.GoToRecord , , acNewRec
when i try to insert the same account number and click the New Record button it give me this error :
Run-time error '2105':
You can't go to the specified record.
but when i click on the navigation button to the next record it will show this :
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. Change the data in the fields or that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again
actually my intention is to have the custom/automatic error msg to indicate the duplicate when you click on the NEW RECORD button !! but my coding fail to do so..can anyone help me on this? Thanks a lot
I need some help here. currently i have
table : customer
primary key : account number
button : New Record embedded with this code
DoCmd.GoToRecord , , acNewRec
when i try to insert the same account number and click the New Record button it give me this error :
Run-time error '2105':
You can't go to the specified record.
but when i click on the navigation button to the next record it will show this :
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. Change the data in the fields or that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again
actually my intention is to have the custom/automatic error msg to indicate the duplicate when you click on the NEW RECORD button !! but my coding fail to do so..can anyone help me on this? Thanks a lot
