No, command buttons do not have "values".
If you want to hide the button, you will first have to set the focus to another control on your form. I usually create an unbound textbox (txt_Dummy) on my forms and set its border and back style to transparent, and width to zero. Then, you could do something like:
Private Sub cmd_Whatever_Click
me.txt_Dummy.setfocus me.cmd_Whatever.Visible = false
end sub
You could just as easily set the focus to any other control on the form, but I find this to be the easiest and cleanest method.
-- HTH Dale
email address is invalid Please reply to newsgroup only.
"TeeSee" wrote:
[Quoted Text] > Does a cmdButton have a value before a click and a different value > after a click? > I'm trying to hide a button immediately after a click but can't due to > the fact "It has focus". Could you please give me a suggestion or is > there a better way to do this? > > Thanks >
|