J
Jody
My database has linked tables. I have 10 users that have
a copy of the database on each of their computers. The
main tables reside in a shared department area on our
network. We "split" the database in order to allow more
than one individual to have the data entry forms open at a
time.
It seemed to be working but I recently noticed that when a
new record is added, instead of the system assigning the
next autonumber in the table (Activity_ID is my primary
key and autonumber field) which in this case should be
513, it tries to assign a 270 which already exists and I
get the following error message:
"The changes you requested to the tabe were no successful
because they would create duplicate values in the index,
primary key or relationship...."
I thought it should automatically put the next number on
the record.
Here's my code to add the new record.
Private Sub CmdAddActivity_Click()
On Error GoTo Err_CmdAddActivity_Click
DoCmd.GoToRecord , , acNewRec
Exit_CmdAddActivity_Click:
Exit Sub
Err_CmdAddActivity_Click:
MsgBox Err.Description
Resume Exit_CmdAddActivity_Click
End Sub
I fairly new to VB and not sure what's happening .... any
suggestions?
a copy of the database on each of their computers. The
main tables reside in a shared department area on our
network. We "split" the database in order to allow more
than one individual to have the data entry forms open at a
time.
It seemed to be working but I recently noticed that when a
new record is added, instead of the system assigning the
next autonumber in the table (Activity_ID is my primary
key and autonumber field) which in this case should be
513, it tries to assign a 270 which already exists and I
get the following error message:
"The changes you requested to the tabe were no successful
because they would create duplicate values in the index,
primary key or relationship...."
I thought it should automatically put the next number on
the record.
Here's my code to add the new record.
Private Sub CmdAddActivity_Click()
On Error GoTo Err_CmdAddActivity_Click
DoCmd.GoToRecord , , acNewRec
Exit_CmdAddActivity_Click:
Exit Sub
Err_CmdAddActivity_Click:
MsgBox Err.Description
Resume Exit_CmdAddActivity_Click
End Sub
I fairly new to VB and not sure what's happening .... any
suggestions?