
Refresh/Requery don't seem to work while doing file I/O
Using requery and refresh will just slow you down. They affect the
data, not the screen. You can use DoEvents, as Aaron suggested, or you
could try Me.Repaint.
If what you really want is a progress bar, then take a look at the
SysCmd function. Among the many unrelated things it allows you to do
is creation and maintenance of a progress meter in the status bar.
-- Andy
Quote:
>Code sample below:
>I am trying to show progress 10%, 20%, ... via a label while reading in a
>large (6 Mb) file. Even though I have Requery and Refresh Access won't
>update the screen until the entire file is done.
>Why does it not update and how can I workaround?
>P.S
>This is was just a test to see if the concept would work, what I really want
>to do is show a progress bar.
> While Not EOF(intFileNo)
> 'See if it is time to update
> If (Seek(intFileNo) / lngFileLength) > intStep Then
> lblProgress.Caption = intStep * 100 'Display percent complete
> Me.Requery
> Me.Refresh
> intStep = intStep + 0.1
> End If
> 'Input the entire line
> strTextLine = Input(CintInputFileLineLength, #intFileNo)
>Wend
>--
>Please respond to the newsgroup AND the author:
>Thanks
>Shawn