How to: Work on an Access application in Visual Studio Code
Build, run and export an Access application from Visual Studio Code, and see every problem of the sources at its file and line in the Problems view.
Solution overview
wkl-office new writes .vscode/tasks.json with the tasks Build (the default build task), Rebuild, Run, Run as
Runtime, Check, Status, Export and Sync. Each calls wkl-office with --format msbuild, in which every problem is a
line <file>(<line>): error WKL<phase>: <object>: <cause>; the problem matcher for MSBuild of Visual Studio Code reads
it.
Implementation
- Put
wkl-officeon the PATH. - Open the project folder in Visual Studio Code.
- Press Ctrl+Shift+B to build; choose Terminal > Run Task for the other tasks.
For a project created before the tasks existed, copy .vscode/tasks.json from a project made with wkl-office new.
Remarks
- Run opens the built database in a visible Access, as a double-click would; Run as Runtime opens it with
/runtime(the ACCDE when one was built). - Forms, reports and code are still designed in Access. Code edited in Visual Studio Code reaches the database open in Access with Sync or
wkl-office import --changed.
Related topics
en/wiki/msaccess/sdk/how-to/work-in-visual-studio-code.txt · Last modified: by Wolfgang van der Stille