Access Open Bypass (cc)
This lesson shows a fellow developer how to use VBA to bypass startup code when opening an Access database for the purposes of getting information from it without running its programs. In addition to bypassing startup, another thing desired to do is open the database read-only. That will be covered another time. This video focuses on opening a database while simulating pressing the SHIFT key by taking advantage of Windows APIs that control the keyboard. Code for this demonstration can be downloaded from Bytes.com: http://bytes.com/topic/access/insights/957647-log-code-property-references Insert a new module with VBA code to open a database and bypass the startup code. The OpenBypass function returns an Access Application object. Learn how to call the OpenBypass function so that you can use it in your code. Windows APIs discussed are GetKeyboardState, SetKeyboardState, SetForegroundWindow, SetFocus, GetWindowThreadProcessId, and AttachThreadInput. Learn that Hex 10, &H10, (Decimal 16,) represents the position of the SHIFT key in the keyboard state, and when the first element of an array is passed to a function, the whole array is passed. Ctrl-Shift-F2 is like clicking the Back button for a web page -- it is the keyboard shortcut for Last Position and has history. -Ade.
Download
0 formatsNo download links available.