Control Value Refresh

jca

I need to think it over !
Local time
Today, 14:10
Joined
Aug 1, 2001
Messages
42
Hi
I've made a code that scan a specific drive retrieve every access database path on this drive to a table. Since the drive is quite big, the code takes some time to execute. So I created a form to show the progress to the user saying something like "Current BD: 17/265" but when I change the value of the field, nothing appears until all the code is executed. So I basicly only see "Current BD: 265/265". I tried to put Forms!FormsSearch.Refresh but it does works. I know my code is working cause in debug step-by-step mode the fields are redrawing themselves on the form. If somebody could help me on this one I would appreciate it.
Thanks,
JCA
 
I've used the DoEvent function in the past to do this.

Place it straight after the line that updates the form. This then yields execution so that the operating system can process other events.

There may be other ways to do this though!
 
DoEvent is not a function VBA has, I don't know if you can call it with an external librarie. Anyway, I've found a way to do it with a simple VBA function:
DoCmd.RepaintObject acForm, "FormSearch"
It's not elegant but it works.
smile.gif
 
For info, it's in my Access97.
Library = VBA
Class = Interaction

Search in the object browser.
 
Your right, my bad
smile.gif

I was writing DoEvent with no 's', no wonder it was not working...
smile.gif

I don't even know why I wrote it wrong, I'm always using it in VB.

Thanks again for the reminder.
 
doevents

just incase anyone is searching for doevent and comes across this one like i did,,,

the answer is

DoEvents

with the s at the end of the word and it completes all processes before it in the code before proceeding, took me a while to realise that he meant he needed an s on the end so thought i would post this to ghelp anyone else who needs it.

DAL
 

Users who are viewing this thread

Back
Top Bottom