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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Messages do not display on form 1

Status
Not open for further replies.

jpl458

Technical User
Sep 30, 2009
337
0
0
US
Have a form that just runs all day counting stuff and displaying counts to users. The DB is SQL Server and the Access DP is linked to the server via an internet connection--Thus the info gathering query, which has groupbys, sums and orderbys, may take 30 seconds or more to run. I have set up a message area on the form that tells the users where the code is at any particular point. However, the messages below (in blue) never get displayed. The messages before and after this group work fine. In addition, these messages display when I single cycle through the code in the editor.

Thanks in advance

Jpl
Dim cnndbo As ADODB.Connection
Set cnndbo = CurrentProject.Connection
Dim rsdbo As New ADODB.Recordset
rsdbo.ActiveConnection = cnndbo
rsdbo.CursorType = adOpenDynamic
'-------------Send query to SQL Server, check for EOF, and set rs cursor to first record------------------
Me.MsgArea.Caption = "Execute Query"
Me.MsgArea.BackColor = vbRed
rsdbo_Open SumBalls

If rsdbo.EOF = True Then
Exit Sub
End If
rsdbo.MoveFirst

'---------------------------------------------------------------------------------------------------------
'Update BayCounts.Counts from RecordSet rsdbo.
'---------------------------------------------------------------------------------------------------------
Dim udq As Variant
Do While Not rsdbo.EOF
Me.MsgArea.Caption = "Updating Table"

 
You may add this code after eeach change of the message:
Me.Refresh
DoEvents

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top