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

Disable visual update

Status
Not open for further replies.

spongie1

Technical User
Nov 24, 2003
57
US
I am a novice programmer and I am unfamiliar with the proper terminology.

I have a form with 7 subforms. Two are pivotcharts. I have written code that "refreshes" the form and all subforms as new data is entered. However, it I can see it switching to the first record then back to the current record as it is being requeried.

I am looking for a way to shut off the visual update on the screen until after all the requeries have completed, or advice on how I can improve my code. I have arrived at a solution. It just needs to be improved.

What is the terminology/commands used for turning off the screen updating, then turning it back on?

If I could describe exactly what I was looking for... I would have already found it.

Here is my code:

Code:
Sub ChangeMachineDT()
  Dim strLastFocus As String
  Dim bm As String   ' bookmark
  Dim ti As Integer
  
  With Forms.frmMachineDT
    If (.mMachine <> &quot;&quot; And .mShift <> &quot;&quot; And .mDate <> &quot;&quot;) Then
      ti = .ActiveControl.TabIndex
      bm = .Bookmark ' store the bookmark
  
      strLastFocus = .ActiveControl.Name

      .frmMDTOverviewTbl.Requery
      .frmDTEntryCht.Requery
      .frmDTEntryChtFrq.Requery
      .frmqryMachineDTMinSched.Requery
      .frmqryMDTPE1.Requery
      .Requery
      .Bookmark = bm ' return to the bookmark
       
      DoCmd.GoToControl strLastFocus
    End If
  End With
End Sub
[code]
 
Check out the &quot;echo&quot; command in the help files.

If you're going to do this, I suggest you make an autokeys macro and assign some key stroke (I usually use ctrl-e) to turn the echo back on, in case your code turns off the echo and crashes before it gets a chance to turn it back on.

Jeremy

PS: It looks like you're soaking up this stuff at a good pace, if you're a novice. Cheers to that.

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Thanks, Jeremy. I gave you a star for your advice. I will implement your suggestions and report back any additional information to this thread should I find other ways to improve my solution.

PS: Soaking is what sponges do : )
 
Yeah, I sort of live on puns, so I couldn't resist.

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top