Chg prop of button on form = not visible perm via code after exec

K

khilb97s

I need to change the property of a button to not visible and not enabled
permanently after execution of the macro that is run by clicking the button.
It works until you reopen the form and then the button is back.
 
R

richard harris

hi, not sure if this is the best way but it has certainly helped me.

i have put an extra field in the table to accept a true value when the
command (your macro) has been executed.

the extra field (a chk box will do ) is hidden on the form. then in the
forms on current or on load event a simple code such as

if me.chbox = true then
me.yourcommandbutton.visible-=false
else
me.yourcommandbutton.visible=true

this has worked for me on a number of occassions.

i hope this helps regards richard
 
K

khilb97s

Thanks Richard, that is a really cool solution, and will do exactly what I
need.
Regards, Karin
 
Top