Assigning Text Box Value to Variable?

  • Follow


Hello all,

I have a simple form with a button and text field.

All I want to do is press button and the text field value is inserted into 
the variable.  I have done the following:-

Dim Subfolder As String
Subfolder = Me![Text1]

but it returns an error message of 'Object doesn't support this property or 
method'.

Please could someone point me in the right direction.

Thank you

Graham

0
Reply Utf 5/1/2010 1:02:01 PM

Your code, as given, works fine in v2003. You don't have another object named
"Subfolder" elsewhere in your app, do you?

I suppose it could be corrupted. You might try deleting the event and
recreating it.

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201005/1

0
Reply Linq 5/1/2010 3:21:07 PM


Subfolder might be a reserved word, try using another variable name. Also you 
only need [ ] around a name if it has embedded spaces or special characters. 
Are you sure there is a control called Text1, use the intellisense to make 
sure, type Me. and then you will get a list.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they 
eat for a lifetime".


"geeves1293" wrote:

> Hello all,
> 
> I have a simple form with a button and text field.
> 
> All I want to do is press button and the text field value is inserted into 
> the variable.  I have done the following:-
> 
> Dim Subfolder As String
> Subfolder = Me![Text1]
> 
> but it returns an error message of 'Object doesn't support this property or 
> method'.
> 
> Please could someone point me in the right direction.
> 
> Thank you
> 
> Graham
> 
0
Reply Utf 5/3/2010 7:46:30 PM

2 Replies
1019 Views

(page loaded in 0.036 seconds)

Similiar Articles:
















7/23/2012 6:18:28 PM


Reply: