Enter value in VB

K

Kevin

Hi

I want to add a value to a field on a form in VB but I
have a run time error 2448 saying that

"You can't assign a value to this object

The object may be a control on a read only form
The object may be on a form that is open in desing view
The value may be too large for this field"

What I tried is

Text85 = 100

Text85 is linked to a field of a query. I can enter the
value if I do it on the form rather than in VB.

Thanks

Kevin
 
H

Howard Brody

Try [Text85] = 100

Text85 = 100 tells Access that the control itself = 100,
not the value entered in the control.

The brackets let Access know that you want the 100 entered
as the .Text or .Caption property for the control.

Hope this helps!

Howard Brody
 
A

Albert D. Kallal

Where is the code being run, and is the form open as the error message
suggests?
 

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