Easy Drill Through with Macros
This tip comes from Tim Getsch - from www.checkoutmycards.com. He wrote to me after seeing my recent post about Display As Hyperlink:
There is the trick that I use for creating hyperlink navigation.
- Create an Access (not VBA) macro with a short name (e.g. dt for Drill Through)
- Add named macros for each of the things you commonly want to drill to
- Contact: OpenForm “Contacts”, WhereCondition: ="[ID]=" & Screen.ActiveControl
- Orders: OpenForm “Orders”, WhereCondition: ="[OrderID]=" & Screen.ActiveControl
- ProductByID: RunCode MySpecialOpenForm([ProductID])
- …
- When you want a hyperlink simply do the following
- Set Display As Hyperlink to Screen Only
- Flip to the Events tab of the property sheet and put the cursor in the On Click event
- >Type “dt.” (You get auto-complete with all of your named macros in the dt macro group.)
- Click the dropdown if you want to see the complete list of named macros.
- Select the macro you want.
This really makes navigation much more manageable.
Tim