Form open event

Ivan Torr 1 Reputation point

I have a from containing a combo box from which I can select a product. Once the product has been selected, it can be viewed or edited depending on your login password. So i have set 1 as admin that can edit items and 2 ,3 a. nd 4 as other users.

When i select the the item, the on click event on the "view product" works as it should, however when i close the form and select another product i get an error. "the Tblproduct list is being used by another user" . I should say that this is a stand alone system at the moment.

I also have another combo box that has the exact same code where i do not get the error.

any ideas would be great.

The "view product" code is below

Private Sub Command10_Click()
If Me!ProdResult.ListIndex = "-1" Then

        MsgBox "A selection is required from the dropdown list", vbCritical, "Required"


Exit Sub

End If

 If Forms!Frmlogin1!PassNo <= 2 Then

 DoCmd.OpenForm "FrmProductSetup", acNormal, , "ProdId=" & [ProdResult], acFormEdit


DoCmd.OpenForm "FrmproductSetup", acNormal, , "ProdId =" & [ProdResult], acFormReadOnly

End If

End Sub

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,857 questions
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,608 questions
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
834 questions
{count} votes