From: alex on 27 Apr 2010 15:52 On Apr 27, 3:28 pm, Daryl S <Dar...(a)discussions.microsoft.com> wrote: > Alex - > > Add a Me.Repaint in the code after each textbox update. > > -- > Daryl S > > > > "alex" wrote: > > Refresh unbound textbox > > > Hello, > > > Using Access 03 > > > I have quite a bit of VBA code that runs a variety of queries. > > Between all of the SQL code, I display information to the user in an > > unbound textbox on the form. Something like this: > > > > Sub RunQueries() > > Me.unboundTextBox = About to run queries > > > Me.unboundTextBox = Running Query A > > Docmd.runsql(queryA) > > > Me.unboundTexBox = Running Query B > > Docmd.runsql(queryB) > > > > > > Me.unbountTextBox = Running Query Z > > Docmd.runsql(queryZ) > > > Me.unboundTextBox = Finished queries > > End sub > > > > > The problem is that (on some occasions) the queries will run without > > the text being displayed; i.e., the textbox will display About to run > > queries and then will display Finished queries. I thought the > > problem was that the queries ran so fast, I just couldnt see the > > textbox change, but this happens even when it takes a few moments for > > the queries to finish. E.g., I can see the queries running in the > > lower left-hand status bar, but the text will not change. > > > Its almost like I need to put in a break (like a msgbox) to get the > > textbox to refreshwhich works strangely enough? Or possibly to set > > the focus back to form/textbox? > > > Any thoughts? > > alex > > .- Hide quoted text - > > - Show quoted text - Wow, I've never got this much help this fast! I just did some preliminary testing and it looks like me.repaint works. I'll post back if that doesn't hold true. I appreciate the help as always. alex |