How to ensure text box control displays value

B

Bob Howard

Hi all,

I have an application with a form that includes, among many other things, a
button and an unbound text box control.

When the user clicks the button, a fairly long-running process begins
(includes creations of reports, PDFs, sending emails to account holders,
etc. etc.).

What I'm trying to do is show some sort of status indication in the text box
control. I would like to move different messages to that control at
different points along the way --- just to keep the user informed of what's
happening and so that they don't think the system died (this process can
take several minutes, depending on the data they've selected, etc.).

What's the magic VBA method (or whatever) to cause the content of the text
box control to be refreshed --- right now it never changes!

Thanks...

bob h
 
M

Marshall Barton

Bob said:
I have an application with a form that includes, among many other things, a
button and an unbound text box control.

When the user clicks the button, a fairly long-running process begins
(includes creations of reports, PDFs, sending emails to account holders,
etc. etc.).

What I'm trying to do is show some sort of status indication in the text box
control. I would like to move different messages to that control at
different points along the way --- just to keep the user informed of what's
happening and so that they don't think the system died (this process can
take several minutes, depending on the data they've selected, etc.).

What's the magic VBA method (or whatever) to cause the content of the text
box control to be refreshed --- right now it never changes!


Most of the time, adding a DoEvents statement after changing
the text box's value is sufficient. If not, then adding a
Me.Repaint and/or another DoEvents almost always takes care
of it.
 
D

Dirk Goldgar

in message
Hi all,

I have an application with a form that includes, among many other things,
a button and an unbound text box control.

When the user clicks the button, a fairly long-running process begins
(includes creations of reports, PDFs, sending emails to account holders,
etc. etc.).

What I'm trying to do is show some sort of status indication in the text
box control. I would like to move different messages to that control at
different points along the way --- just to keep the user informed of
what's happening and so that they don't think the system died (this
process can take several minutes, depending on the data they've selected,
etc.).

What's the magic VBA method (or whatever) to cause the content of the text
box control to be refreshed --- right now it never changes!


After you change the value of the text box, execute the statement:

DoEvents

If that isn't enough, add

Me.Repaint

as well.
 
B

Bob Howard

thanks y'all !!

Dirk Goldgar said:
in message



After you change the value of the text box, execute the statement:

DoEvents

If that isn't enough, add

Me.Repaint

as well.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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