dating awkward - Access vba turn off screenupdating

Christian Mark - you just beat me to it but as a fellow Celt any chance you could help me out with a fairly tricky problem ??

I have a VB app that neds to read a variable entered by a user, access an Access database and read some information from it based on the entered variable.

It essentially freezes the screen until the code is fully executed.

Access vba turn off screenupdating Hookup surrey bc

The user should never have access to the db window or any of the db objects. Echo False, "Visual Basic code is executing." This does the same as above except no message text.

They should be navigating and accessing the data through forms. If you do not turn if back on your users will have all kinds of problems with your db. Echo True in that sub or functions error handler to ensure that Echo is turned back on just incase there is a runtime error within that sub or function.

From my own test I find out that turning screen updating off and on takes about 15ms (tested in C# via Excel Interop).

Keep that on mind if you will execute anything which would take less time.

Develop in-demand skills with access to thousands of expert-led courses on business, tech and creative topics.

I always assumed it was just used so that it didn't scare end users into thinking their PC was about to crash.

Use this code template as a starting point (the error handler ensures that these properties are turned back on at the end of the sub, even if it errors) Sub Your Sub() On Error Go To EH Application. Select Next i 'get results results = "Screen Updating not disabled: " & Format(Time - start Time, "hh:mm:ss") & " seconds" start Time = Time 'scenario 2 - screenupdating disabled Application.

Screen Updating = False 'swap between sheets 1/2 (need both sheets or this will crash) For i = 1 To numb Switches Sheets(1 (i Mod 2)). Screen Updating = True 'get results for part two results = results & vb Cr Lf & "Screen Updating IS disabled: " & Format(Time - start Time, "hh:mm:ss") & " seconds" 'show results Msg Box results End Sub Firstly I've been using the script written by Richie (UK) Post #7 Here It simply iterates through a loop changing the value of i in one cell.

I have a bunch of different excel sheets that I turn off screenupdating in.

Tags: , ,