Assign numeric value to bound text box

J

jumping jim

I want to assign a numeric value (any type) to a bound text box preferably
from a variable. I keep getting an error message "object required" in an
Access database. May be simple to some of you but what do I need to do
to make it work?
 
J

John Welch

You have to show your code or no one can tell why it's not working without
just guessing. To assign a value to a textbox called txtMyBox, you say:
me.txtMyBox = myVariable
-John
 
J

jumping jim

Thanks, John Welch. As you said, I may have to show my code. I tried
assigning it by using same code as you show. Tried it with bound textbox and
got error, "Object required". When textbox was unbound, it took the
assignment perfectly.
 
J

jumping jim

jumping jim said:
Thanks, John Welch. As you said, I may have to show my code. I tried
assigning it by using same code as you show. Tried it with bound textbox and
got error, "Object required". When textbox was unbound, it took the
assignment perfectly.

Code follows:
Module level: Public Counter as Integer
Public sub SetCounter()
Counter = 1
End Sub

On Open
Counter = 1
Forms![PELbsEntry]![txtQuad]=Counter

Error message: "You cannot enter this"
How can I make it work?
 

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