Refreshing an unbound control

B

Burma Jones

I have a form with an unbound textbox. The form is bound to a query. Is
there a way, without refreshing the entire form, to change the contents of
the unbound textbox with the click of a button? Something like:

Private Sub Button1_Click()
Me.UnboundTextbox1 = "Test"
End Sub

Currently I have to page to the next record to see the change.

Thanks!
 
R

RuralGuy

Have you tried *exactly* what you posted?

By the way thanks for CrossPosting instead of MultiPosting. Just so you know,
the same people cruise all of these groups and it is hardly ever necessary to
post in more than one group.

I have a form with an unbound textbox. The form is bound to a query. Is
there a way, without refreshing the entire form, to change the contents of
the unbound textbox with the click of a button? Something like:

Private Sub Button1_Click()
Me.UnboundTextbox1 = "Test"
End Sub

Currently I have to page to the next record to see the change.

Thanks!

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
B

Burma Jones

I did try my code but like I said, I don't see the text change till after I
page to the next record. Thanks
 
R

RuralGuy

Correct me if I'm wrong but you are saying that when you push Button1 the word
"Test" does *not* show up in UnboundTextbox1 until after you move to the next
record?

I did try my code but like I said, I don't see the text change till after I
page to the next record. Thanks

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
A

Arvin Meyer [MVP]

Your code will change an unbound text box, and coincidentally a bound one if
your query is updateable and the text box is bound to a field which will
accept that data. It will make the change immediately without having to move
to another record. Are you getting an error message?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
B

Burma Jones

I'm not sure what happened to my db that prevented this from working, but
when I ran decompile, compact, and repair, it worked! Thanks for your help
everyone.
 
Top