Repaint not working (1 Viewer)

scottrie2

Registered User.
Local time
Today, 08:46
Joined
Dec 27, 2018
Messages
15
I have an unbound form. There are two text boxes on the form, one for TotalRecords and the other for CurrentRecord. When I click the start button a process starts where I append records to a table (that part is working fine). Since this process can take a long time (10 minutes or so), I want to let the user know that the system is still working on processing. I have a counter that moves through the recordset that should tell the user what record is being worked on. I am using the command Me.Repaint before the loop and then within the loop of records that should display what record is being processed. The problem is that it will work for the first 5 or so records, but then it stops refreshing or repainting the form. Any ideas? I am open for a different approach as well.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:46
Joined
Oct 29, 2018
Messages
21,524
Hi. Can you post the code? Thanks.
 

June7

AWF VIP
Local time
Today, 04:46
Joined
Mar 9, 2014
Messages
5,490
I tested setting value of a textbox inside a loop. Did not use Repaint. It works. Might post your code for analysis or provide db by following instructions at bottom of my post.

Could just change the cursor to Hourglass before process and then change back to normal after.

DoCmd.HourGlass True

DoCmd.HourGlass False
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:46
Joined
May 7, 2009
Messages
19,246
add DoEvent on your code. this will allow access to update any events in buffer.
 

Users who are viewing this thread

Top Bottom