MS Access 2007 Step By Step - Asim Abbasi

CH1: Overview | CH2:  MS Access Local & Linked Tables | CH3:  MS Access Queries | CH4: MS Access Reports & Forms | CH5: MS Access Modules & Macros | CH6: MS Access Data Import/Export Feature | CH7: MS Access Built-In Functions

Chapter 5: MS Access Modules & Macros

Page #: 1 | 2 | 3 | 4 | 5 | 6 | 7

 

Creating Module: auto_login


Figure 5-1: Accessing Module coding environment.
________________________________________

 

1. Once you have your MS Access up and running click on the “Create” command as shown in Figure 5-1 with label 1.

2. Expand the Macro drop-down menu as pointed by label 2 in Figure 5-1.

3. Click the “Module” command on the expanded menu as shown with label 3.

4. Click on the Name property as shown in Figure 5-2 and name it as ‘auto_login’.

5. It’s clearly shown in Figure 5-2, the title of the window states “MS Visual Basic”. Click <File> then <Save> and close the window.

 


Figure 5-2: (Visual Basic) Module coding environment.
________________________________________

 

The target over here is to create a Module so that we don’t have to login to Oracle Server every time we open MS Access. We have just named that module as ‘auto_login’. Next step would be to populate this module with program logic.

Once you double click the module ‘auto_login’ as shown Figure 5-3, this will open the code window for auto_login module.

 


Figure 5-3: auto_login module under Modules object.
________________________________________

 

Populate the code area with the code shown in Figure 5-4. Like I said before this book is not meant for, to make you master on MS Visual Basic programming but those who know Visual Basic understand very well what we want to do via this code. We will do explain this code in detail in the next article.

 

Chapter 5: MS Access Modules & Macros

Page #: 1 | 2 | 3 | 4 | 5 | 6 | 7

CH1: Overview | CH2:  MS Access Local & Linked Tables | CH3:  MS Access Queries | CH4: MS Access Reports & Forms | CH5: MS Access Modules & Macros | CH6: MS Access Data Import/Export Feature | CH7: MS Access Built-In Functions

Share with others: