error when switching between forms

  • Thread starter cwAFcontractor via AccessMonster.com
  • Start date
C

cwAFcontractor via AccessMonster.com

Good day all. I'm having trouble with my database. I'm not sure whats causing
the error but the error msg that pops up is: "The table 'Spares - Office' is
already opened exclusively by another user, or it is already open through the
user interface and cannot be manipulated progrmmatically." The command button
that im pushing that receives this error is to close out the current form (we
will call spares) and open another form (we will call additions). The spares
form allows the user to search through the database to see if they can find
the spare they wish. They are unable to change or manipulate any of the data
so that they don't accidentaly delete or change a part number. the additons
form is the form that allows them to add a part number to the table if its
not already added there but can't see the already posted data. Both forms
are using the same table. Now when i go form the additions form back to the
spares i have no problems or issues. But when i try to go from the spares to
the additions i'm unable to. Here is the code to get from the spares to the
additions.

Private Sub cmdgtoa_Click()
On Error GoTo Err_cmdgtoa_Click

DoCmd.Close

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Office Additions"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdgtoa_Click:
Exit Sub

Err_cmdgtoa_Click:
MsgBox Err.DESCRIPTION
Resume Exit_cmdgtoa_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top