tszeis
Apr 27 2005, 08:27 AM
In the following code the [Me.lblStatus.Caption = "SCANNING"] at the begining of the code does not work but the [Me.lblStatus.Caption = "SCANNING NOW COMPLETE"] on the end does. Does anyone know why?
Private Sub cmdProcSCC_Click()
Me.lblStatus.Caption = "SCANNING"
DoCmd.Hourglass True
Me.Form.Refresh
Open "C:\SccTestDocument.txt" For Input As #1
SccFile = LOF(1)
fileContents = Input(SccFile, 1)
filelines = Split1(fileContents, vbCrLf)
Close
fileElements = Split2(filelines)
Me.lblStatus.Caption = "SCANNING NOW COMPLETE"
DoCmd.Hourglass False
End Sub
freakazeud
Apr 27 2005, 08:29 AM
Hi,
You don't need the Form part in the refresh.
Just: Me.Refresh
HTH
Good luck.
tszeis
Apr 27 2005, 09:08 AM
I changed it but it's still not working. The form acts like it want to wait until it processes the split functions before refreshing. I don't know why.
freakazeud
Apr 27 2005, 09:17 AM
Is it a main form or a subform?
Try referencing the form or subform:
Forms!Mainform!Refresh
Forms!Mainform!Subform.Form!Refresh
Maybe a Me.Requery would work instead, too.
HTH
Good luck
tszeis
Apr 27 2005, 09:37 AM
do you mean Forms.Mainform.Refresh?
I tried it. It doesn't work. Is there a command that pauses and lets the system catch up? Maybe the system is so involved with processing the function it doesn't have a chance to fully refresh.
freakazeud
Apr 27 2005, 09:45 AM
No I don't think so.
It should refresh whenever you tell it to refresh.
Did you try a Me.Requery?
tszeis
Apr 27 2005, 11:57 AM
Yes I did. I have no idea why it's not working.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.