
ACCESS VBA - why different from other vba?
The problem is that you're used to a slightly different
object structure than what Access has. Here's what you
need to do:
1) To show and hide a form, you have to set the Visible
attribute, like -
form.Visible = False 'hide the form
form.Visible = True 'show the form
2) To clear a textbox, the attribute you need to set Value
= txtClearMe.Value = "" 'clear the txtClearMe textbox
Hope that was what you were asking.
Paul
Quote:
>-----Original Message-----
>This is the first time i use vba in Access, but I found
sometime odd as
>compared to other vba:
>1) I want to show and hide form using event procedure (of
a button on the
>form), rather than macro. But:
>myform1.hide
>myform2.show
>doestn work because there is no such actions in Access
vba! I must do this
>as an event procedure. How?
>2) I have a clear button on the form so that once it is
clicked, the entry
>in text box is clear. So my code is:
>private sub clearbutton_onclick ()
>textbox1.text = ""
>end sub
>To my athonisment, this simple code doesnt work too. Why?
>.