Desbrina Bored

Joined: 11 Jun 2005 Posts: 3120 Location: Around Somewhere
|
Posted: Mon May 18, 2009 10:26 am Post subject: access, forms and data |
|
|
I'm using Access 2007. I've created a form (frmaddmember)
I'm now trying to refer to a field on the form in the vb code. Now my vb is a bit rusty, haven't used it in a while so its possible things have changed since i last used it
I've tried several variations of doing it
| Code: | Dim fname As String
fname = frmaddmember.FirstName |
or
| Code: | Dim fname As String
fname = frmaddmember.FirstName.Text |
produces
| Quote: | Run-time Error '242':
Object required |
If i use
| Code: | Dim fname As String
fname = FirstName.Text |
i get
| Quote: | Run-time Error '2185':
You can't reference a property or method for a control unless the control has focus |
Any know how its supposed to be done?
In the end its going to go into an sql statement _________________ Midnight Tempest - A Sailor Moon TCG
Calona - an adoptables site
Top Tycoons - Coming soon
My Stories |
|