Assigning Text Box Value to Variable?

G

geeves1293

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
 
L

Linq Adams via AccessMonster.com

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.
 
D

Dorian

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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top