What is VBA Access
VBA stands for Visual Basic for Applications (the application being of course Microsoft Access) and is the technology and tools used to program and automate this application.
It’s not only used just within the framework of Microsoft Access Database but other applications too including Microsoft Excel, Microsoft Word, Microsoft Outlook to name a few.It has the power to communicate with other applications beyond the Microsoft range and even the Microsoft Windows operating system across other platforms.So, learning the principles of VBA using Access as the tool environment will stand you in good stead for the other applications should you wish to program and code them in the future.The only difference between other applications when wanting to use VBA will simply be learning to load and work with different libraries.Typical reasons why you would use Microsoft Access VBA include being able to
    1.Manage smaller re-usable procedures (globally).
    2.Create you own defined functions
    3.Hold variables in memory (globally).
    4.Attach code to an event i.e. a button on a form.
    5.Manage more powerful procedures that an Access macro lacks.
    6.Communicate with other applications and platforms.
    7. Gracefully handle errors (when they happen).
Application Project VBA Access
Updating References
References in your application provide library code that can be reused. Whether it is VBA code in another database that is being used as a library, a separate DLL, or ActiveX control, you may need a way to determine whether a reference is missing and subsequently update the reference. Missing references can cause expressions in the application to break.
References in your application provide library code that can be reused. Whether it is VBA code in another database that is being used as a library, a separate DLL, or ActiveX control, you may need a way to determine whether a reference is missing and subsequently update the reference. Missing references can cause expressions in the application to break.
The following code shows you how to iterate through and update a reference to another Access databases.
Application.BrokenReference Property
Syntax
Expression.BrokenReference
Application.References propertyy
You can use the References property to access the References collection and its related properties, methods, and events. Read-only References collection.
Syntax
Expression.References
Example
Private sub cmdConneciton()
Debug.Print Application.BrokenRefrence
Application.References.AddFromFile CurrentProject.Path & “\Staff.accdb”
End sub
Please Watching My Video is Below
No comments:
Post a Comment