BDCarrillo
Technical User
Here's the info:
tblShop_Names
Shop_Name
Shop_Code
Locked - Yes/No
Locker - Text (used to store username)
I've written the following code:
I just can't figure out how to have it only look at and edit the locked/locker values from the record in tblShop_Names that matches the selected shop/shop code. I have 12 shops to work with, each with a unique code/name.
tblShop_Names
Shop_Name
Shop_Code
Locked - Yes/No
Locker - Text (used to store username)
I've written the following code:
Code:
'check if shop is locked
If Me.Locked.Value = 0 Then
'open shop_form And [Shop_Code] = 502, load global variable
DoCmd.OpenForm "Shop_Form", acNormal, , "[Shop_Code] = 502", , acDialog
ShopCodeTemp = "502"
'lock shop code and record user
Me.Locked.Value = 1
Me.Locker.Value = Environ("Username")
Else
MsgBox ("User" & Me.Locker.Value & "is currently editing the selected shop.")
End If
I just can't figure out how to have it only look at and edit the locked/locker values from the record in tblShop_Names that matches the selected shop/shop code. I have 12 shops to work with, each with a unique code/name.