H
harrymahal
Guest
Hi...
I am using Access for the first time and am having trouble.
I have to set up a form containing a Text Box, A Label and a Button. I have to write a Caption on the Label asking the user to enter a name. Also I have to edit the Text Box's Text Property to leave it blank. I do not know how to do this.
The code attached to the button is:
Private Sub Command1_Click()
Label1.Caption = Text1.Text
End Sub
So when I clcik on the button, the Label should display the user's name.
But I keep getting an error:
Run-time error '2185':
You can't reference a proerty or method for a control unless the control has the focus.
I don't know what this error means....
Please help.....as I am just a beginner
Thankyou in advance
Harry
I am using Access for the first time and am having trouble.
I have to set up a form containing a Text Box, A Label and a Button. I have to write a Caption on the Label asking the user to enter a name. Also I have to edit the Text Box's Text Property to leave it blank. I do not know how to do this.
The code attached to the button is:
Private Sub Command1_Click()
Label1.Caption = Text1.Text
End Sub
So when I clcik on the button, the Label should display the user's name.
But I keep getting an error:
Run-time error '2185':
You can't reference a proerty or method for a control unless the control has the focus.
I don't know what this error means....
Please help.....as I am just a beginner
Thankyou in advance
Harry