Have a really simple database:
- a switchboard (that opens when opening the database)
- "frmAllContacts" which is a list of all the names of people in my database, with an "open" button next to each record
- "frmContacts" which opens when you lick on the corresponding "open" button on the "frmAllContacts"
All works, but for some reason I cannot understand, if I have the "frmAllContacts" form open at the same time as the "frmContacts" form, I can't update any records as it tells me "This recordset is not updateable". But if I (manually) close "frmAllContacts" then I can amend the records in frmContacts again. However, if on loading "frmContacts" I put some code to close the form "frmAllContacts" (DoCmd.Close acForm, "frmAllContacts") then it still doesn't allow me to amend records.
I've never run into this issue before and have other databases that seem to work fine in the same way.
There are no queries in the database.
The "open" button next to each record in frmAllContacts links the data using:
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmContacts"
stLinkCriteria = "[Contact ID]=" & Me![Contact ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Su
Clearly frmAllContacts is somehow locking the records for some reason, when it's open.
Have attached a copy of the database (with data removed).
Any help much appreciated!
Thanks
- a switchboard (that opens when opening the database)
- "frmAllContacts" which is a list of all the names of people in my database, with an "open" button next to each record
- "frmContacts" which opens when you lick on the corresponding "open" button on the "frmAllContacts"
All works, but for some reason I cannot understand, if I have the "frmAllContacts" form open at the same time as the "frmContacts" form, I can't update any records as it tells me "This recordset is not updateable". But if I (manually) close "frmAllContacts" then I can amend the records in frmContacts again. However, if on loading "frmContacts" I put some code to close the form "frmAllContacts" (DoCmd.Close acForm, "frmAllContacts") then it still doesn't allow me to amend records.
I've never run into this issue before and have other databases that seem to work fine in the same way.
There are no queries in the database.
The "open" button next to each record in frmAllContacts links the data using:
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmContacts"
stLinkCriteria = "[Contact ID]=" & Me![Contact ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Su
Clearly frmAllContacts is somehow locking the records for some reason, when it's open.
Have attached a copy of the database (with data removed).
Any help much appreciated!
Thanks