Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access equivalent for Label.refresh method

Status
Not open for further replies.

Orcanut

Programmer
Sep 3, 2002
24
CA
The following function works in VB. When I try to utlize it in an Access application however Refresh does not appear to be a method available to my Label30 control. Is there some work around? Thanks

Function Commentary(nts As NullTermString) As Integer
frmSampleCreditCHEQ.Label30.Caption = NullToString(nts)
frmSampleCreditCHEQ.Label30.Refresh
Commentary = 1
End Function
 
The Refresh is necessary because the Label is getting a series of messages from an outside source - a PINPad. It will show the first line of input but then hangs when the next input comes from the PINPad because the Label is not refreshing. In a VB test bed it works fine but not in the Access Application.

 
Instead of a label, have you considered using a text box and changing the formatting? This might give you the functionality you want (I'm not positive, but it seems likely).
 
Oh, I know what you need--after updating the label, run the "DoEvents" command. This will process the change to the label.

I'm positive this is what you're looking for. For rapid updates (i.e. homebrew status bars), Access doesn't visibly update controls unless you run a "DoEvents" after every control update. --
Find common answers using Google Groups:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top