IN THE SPOTLIGHT: MDE to MDB Conversion Service
(also supports: ACCDE to ACCDB, ADE to ADP, etc)
IN THE SPOTLIGHT: Access Database Repair Service
An in-depth repair service for corrupt Microsoft Access files
IN THE SPOTLIGHT: vbWatchdog
VBA error handling just got easier...
" vbWatchdog is off the chart. It solves a long standing problem of how to consolidate error handling into one global location and avoid repetitious code within applications. "
- Joe Anderson,
Microsoft Access MVP
Meet Shady, the vbWatchdog mascot watching over your VBA code →
(courtesy of Crystal Long, Microsoft Access MVP)
IN THE SPOTLIGHT: vbMAPI
An Outlook / MAPI code library for VBA, .NET and C# projects
Get emails out to your customers reliably, and without hassle, every single time.
Use vbMAPI alongside Microsoft Outlook to add professional emailing capabilities to your projects.
IN THE SPOTLIGHT: Code Protector
Standard compilation to MDE/ACCDE format is flawed and reversible.
Provided by Allen Browne, allenbrowne.com
Some commercial programs (Tracker, Quicken, etc) allow the user to press "+" or "-" to increment or decrement a date without the hassle of selecting the day part of the field and entering a new value. This is especially useful in fields where the default date offered could be a day or two different from the date desired.
To provide this functionality in Access, attach this Event Procedure to the KeyPress event of your control.
Select Case KeyAscii Case 43 ' Plus key KeyAscii = 0 Screen.ActiveControl = Screen.ActiveControl + 1 Case 45 ' Minus key KeyAscii = 0 Screen.ActiveControl = Screen.ActiveControl - 1 End Select
When any alphanumeric key is pressed, Access passes its ASCII value to your event procedure in the variable KeyAscii. The code examines this value, and acts only if the value is 43 (plus) or 45 (minus). It destroys the keystroke (so it is not displayed) by setting the value of KeyAscii to zero. The active control is then incremented or decremented.
This idea is not limited to dates, or even textboxes. The code can be adapted for other keystrokes as required. Use the KeyDown event to distinguish between the two plus keys (top row and numeric keypad), or to trap control keys such as {Esc}. Anyone feel like reprogramming an entire keyboard?
Home | Index of tips | Top |
Rate this article:
This is a cached tutorial, reproduced with permission.
iTech Masters | VAT: GB202994606 | Terms | Sitemap | Newsletter