Sample Code Collection Database

Download Sample Access File: My Code Collection DB

This is an example file of Code Collection database that I created for myself. There are 96 VBA Access code names/functions included in this file. This database can be modified for another similar data collection type such as song collection, video/movie collection, address book etc.

Main

Highlight functions or features in this file include:

1. The technique of how to remember the last selected Program Language on the 1st combo box. When program is opened, the Program combo box will display the program type that was selected last time. Learn how to use the Update SQL command from this technique.

remember last selected

2. Learn how to use link two combo boxes to each other. The value on the 2nd combo box is depending on the selected value from the 1st combo box. As shown below, there are many Type/Categories for each Program Language.

Selection

security cat3. The list of code name will display after the Type/Category is selected on the 2nd combo box. After the code name is selected from the list then the code detail will display on the Memo box on the right hand side, but display as read-only to protect the code information.

 

 

4. There are 96 samples of VBA Access code names/functions included in this sample file. You can use these VBA code to implement in your program. You can add your own code as you want.

all code

5. The Search page is included in this file. You will learn/ see coding of how to make a search keyword from this page. Learn how to use SQL command in Access VBA for a RecordSource for a Continuous form.

search page

6. Example of opening a form for data entry from a Navigation button by assigning a form name to the Navigation Target Name under Data property of Navigation tab.

add new

7. This is file also provides the example of Sub-Navigation Form that assigned to the Main Navigation Form (Data Page tab). You can add more your own program languages under the Language Tab of Sub-Navigation form or Data Page tab.

add language

8. You can also add your own Type or Category for each program language under the Code Category tab of Sub-Navigation form.

add cat

9. You will learn how to protect the field or changing a field or textbox properties by using VBA code from this sample file. Click on “Edit” button to unlock the protected field and edit the code detail. A red border and a yellow button will display while it is in an edit mode.

 lock text

10. You will see the example of using click event to open a new form that links to the record id that you click on. The new form will display a full VBA coding and also links to the Edit Form of that code as shown below.

search and view code
11. You can also print the VBA code for the selected code from the code detail form. You will learn the example of how to use SetTempVar command ,OpenReport command and MessageBox from Embedded Macro from the print button. Only a report that has a record ID links to the record ID on a current form will be printed by using SetTempVar command.

print macro

print code

Download file contains:

4 tables, 10 Forms, 1 Report and 1 Module

table list