Vba screen updating off

16 Sep

You won't be able to see what the macro is doing, but it will run faster. Turn screen updating off to speed up your macro code.I can do all of this apart form the last bit where I access the report and write the data onto the reports controls. (just a personal joke there) I have as much knowledge of Access as the huns have of European football after Christmas.Hi all, I have a macro that executes ~200 queries which modify the data, create some tables etc.I have a macro that runs for about a minute and loads/processes a lot of data.Naturally I've turned off screen updating so that it runs faster and doesn't jump around all the time.

Everyone I have talked to has advised me to avoid using macros when possible.When you run this example, you can compare the respective running times, which are displayed in the message box. Screen Updating = True For i = 1 To 2 If i = 2 Then Application. Screen Updating = False start Time = Time Worksheets("Sheet1"). Value = i If i = 2 Then ' Msg Box "A2 was updated: " CStr(Range("A2"). Status Bar = "A2 updated to: " CStr([A2]) End If Sleep 500 Next i Application. How can you turn off the flashing screen during macro execution ?For example, this code will resize a sub-form within a resized form: [font=Verdana][size=2]You should not have to do all that.Queries will run in the background if the correct command syntax is used.The url is Ed : Resize Form Controls You can use the Inside Height and Inside Width properties of an Access form to dynamically resize controls at run-time.A form's Resize event as well as firing when a user resizes a form, also fires when a form is loaded.The macro runs when the user clicks a button on a form.I would like the queries to be invisible while they are running, but currently the user sees 50 query windows open/close which is ugly.