Form open event
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"
Me!ProdResult.SetFocus
Exit Sub
End If
If Forms!Frmlogin1!PassNo <= 2 Then
DoCmd.OpenForm "FrmProductSetup", acNormal, , "ProdId=" & [ProdResult], acFormEdit
Else
DoCmd.OpenForm "FrmproductSetup", acNormal, , "ProdId =" & [ProdResult], acFormReadOnly
End If
End Sub