is there a code in the record to determine this?
normally set the form to ALLOWEDITS= FALSE
user clicks a button to unlock, enter the code.
Now you can either hardcode the passcode in vb (not great) , or put the passcode in a table then check it (better) so it can be changed on the fly.
Code:
sub btnUnlock_click()
dim vRet
vRet = InputBox("Enter edit code","Authorized only")
me.ALLOWEDITS = IsValidUnlockCode(vRet)
end sub
'when user changes records
sub form_OnCurrent()
me.ALLOWEDITS=false
end sub
function IsValidUnlockCode(byval pvCode)
dim vCorrectCode
vCorrectCode =Dlookup("[passcode]","tPassword")
IsValidUnlockCode=vCorrectCode = pvCode
if vCorrectCode <> pvCode then msgbox "Incorrect code"
end function