ShiftByPass and Image

  • Thread starter Thread starter alpapak via AccessMonster.com
  • Start date Start date
A

alpapak via AccessMonster.com

ShiftByPass and Image
------------------------------------------------------------------------------
--

hi
i have a form(with password) where i can change the property ShiftByPass
i want to put an image(something like a key )in the startup form where it
will show me :
1) Image visible if ShiftByPass is True
2) Image not Visisble If ShiftByPass is False

i tried something using IF statement but it did not work

If ...... then
me.Image.Visible=True
Else
me.Image.Visible=False
End If


thxs
 
(untested)

dim b as boolean
on error resume next
b = currentdb.properties![shiftbypasskey]
if err.number<>0 then b=false
on error goto 0
if b then
msgbox "set"
else
msgbox "not set"
endif

The above code assumes that the shiftbypasskey property is a boolean
property with values true or false. I think that's right, but I don't
have Access here to check.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
I think you are on the right track. I don't know what your code looks like
to set or unset AllowBypassKey, but assuming you have named the property
"AllowByPassKey", then this should work:

me.Image.Visible = Currentdb.Properties("AllowBypassKey")
 
Back
Top