|
|
Finding useful VBA codeExamples or VBA code can teach you so much about Visual Basic and the correct way to use it. But where can you get working examples of VBA code? Well I have found one of the best resources right inside MSAccess itself ! Macros are easy ways to do things, but often won't allow you to use the program structure you want. But if you know a macro that does part of the job, then you can convert this macro to VBA code and then use this code in your module. How:- 1) First find the macro that does your job. Create a new macro and click on the scroll down box on the Action column.
You will see a list of available actions. Choose one and look for the blue writing that tells what the macro does.
If this one doesn't do what you want, try another. When you have the macro that does what you want then you can learn about the options and arguments by clicking on the boxes in the lower part of this box. Once again, this help will appear in blue writing . 2) Convert this macro to VBA code. Choose File then Save As and change the AS to Module.
3) Use this code in your module. The code will appear in the Modules Objects. You can open the module to cut and paste the code.
|