
Start from menu: Constant > Object Inventory
(MS Access only) It is good practice not to use strings in your code but to declare them as constants. However declaring each object in Access, each form, table, each field can be just too much work, even with the help of Insert Objectname. For this reason we added to the Constant submenu a macro which in one shot creates all relevant constants. As a result all these names available in intellisense and declared. So from now on, if you start typing 'frm', all form contants popup and can be inserted with a single click
First time Object Inventory is run it creates a module basObjectInventory:
Public Const tbl1 As String = “tbl1”
Public Const fldf1 As String = “f1”
Public Const fldf2 As String = “f2”
Public Const tbl2 As String = “tbl2”
....
Public Const qry1 As String = “qry1”
...
Public Const frm1 As String = “frm1”
...
- inserted
constants are compilable, e.g. if table is called “My Contacts” then it should
be
Public Const MyContacts As String = “My Contacts”
- fields get a prefix
“fld”
- insertion is done
automatically without any user interaction
- if a const can’t be
created / already exists it is skipped
- In case of second
run (update) extra items are inserted at the correct position