Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Lively Controls on Form

Introduction

In most projects, our primary focus is always on completing the work on time and delivering it to the user as quickly as possible. I make every effort to stay on schedule and ensure that the user receives the application for testing without delay. However, I also like to take a second look at the overall design and appearance of the Forms and Reports in a more relaxed frame of mind. This allows me to introduce some improvements, explore new ideas, and incorporate enhancements—alongside the requirements suggested by the user.

From past experience, these little refinements have always been met with appreciation. Users often respond positively to subtle design improvements, which motivates me to keep experimenting with fresh ideas in future projects. After all, Forms are the first component that catches a user’s eye, followed by well-formatted Reports and visually engaging charts.

Forms hold a special place in the Users' minds. They should not only be functional but also visually pleasing and user-friendly. Once the core functionality of an application is complete, and if time permits, revisiting the main forms’ design can open the door for creativity. Even small visual tricks can make a significant difference. For instance, most controls we place on Microsoft Access forms are static, but by introducing a touch of movement or animation—applied tastefully and without excess—we can leave a lasting positive impression on users.

We have already explored several animation techniques for form controls in earlier discussions. If you’d like to revisit those, the links are provided below:

  1. Command Button Animation
  2. Reminder Ticker Form
  3. Startup Screen Design
  4. Animated Floating Calendar
  5. Wave Shaped Reminder Ticker
  6. Command Button Animation-2
  7. Animating Label on Search Success
  8. Run Slide Show when Form is Idle
  9. Label Animation Style-1
  10. Label Animation Style-2
  11. Label Animation Variant
  12. Label Animation Zoom in Style
  13. Label Animation in Colors
  14. Label Animation Zoom-out Fade
  15. Digital Clock on Main Switchboard

Option Group Control Style Change on Mouse Move.

In this example, we will apply a simple trick to an Option Group control to make it respond visually when the mouse moves over it. The idea is straightforward: when the Option Group is created, we set its Style property to Raised. As the mouse moves over the control, the style changes to Sunken, and when the mouse moves away, it reverts back to the original Raised state. This repeated action gives the Option Group a more dynamic and lively appearance, making the form more engaging for users.

Create a Form for Demo.

  1. Open a new Form in Design View.

  2. Click on the Wizard Button (with the magic wand icon) on the Toolbox to select it, if it is not already in the selected state.

  3. Select the Option Group control and draw it on the detail section of the form.

  4. Enter the options as shown on the design below by pressing the Tab key after each option to advance to the next row. You may enter any Text as options as you like.

  5. Complete the design by selecting the Finish Command Button.

  6. Move the attached label above and make it as wide as the Option Group Control, and change its Caption to Main Menu.

  7. Move the attached child label above and make its width the same as the Option Group control, and align it to the left edge. 

  8. Change the Caption of the label to Main Menu.

  9. Click on the Option Group to select it and display its Property Sheet (View -> Properties or press ALT+Enter).

  10. Change the following Property Values as given below:

    • Name = Frame0

    • Back Style = Normal
    • Special Effect = Raised

    The Form's Class Module Code.

  11. Display the VBA Code Module of the Form (View ->Code or click on the Module Toolbar Button or press ALT+F11).

  12. Copy and Paste the following VBA Code into the VBA Module of the Form:

    Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
       If Me.Frame0.SpecialEffect <> 1 Then
           Me.Frame0.SpecialEffect = 1
       End If
    End Sub
    
    Private Sub Frame0_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
       If Me.Frame0.SpecialEffect <> 2 Then
           Me.Frame0.SpecialEffect = 2
       End If
    End Sub
  13. Save and close the Form.

    The Demo Run.

  14. Open the Form in the normal view.  You will find the Option Group control is in Raised style.

  15. Move the mouse over the control, and it will enter the Sunken state.

  16. Move the mouse pointer away from the control, and it will restore to the Raised state.

  17. Repeat this action in quick succession, and you can see how the Option Group control responds to this simple action; otherwise, it remains rigid forever.

Technorati Tags:
Share:

No comments:

Post a Comment

Comments subject to moderation before publishing.

PRESENTATION: ACCESS USER GROUPS (EUROPE)

Translate

PageRank

Post Feed


Search

Popular Posts

Blog Archive

Powered by Blogger.

Labels

Forms Functions How Tos MS-Access Security Reports msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Class Module External Links Queries Array msaccess reports Accesstips WithEvents msaccess tips Downloads Objects Menus and Toolbars Collection Object MsaccessLinks Process Controls Art Work Property msaccess How Tos Combo Boxes Dictionary Object ListView Control Query VBA msaccessQuery Calculation Event Graph Charts ImageList Control List Boxes TreeView Control Command Buttons Controls Data Emails and Alerts Form Custom Functions Custom Wizards DOS Commands Data Type Key Object Reference ms-access functions msaccess functions msaccess graphs msaccess reporttricks Command Button Report msaccess menus msaccessprocess security advanced Access Security Add Auto-Number Field Type Form Instances ImageList Item Macros Menus Nodes RaiseEvent Recordset Top Values Variables Wrapper Classes msaccess email progressmeter Access2007 Copy Excel Export Expression Fields Join Methods Microsoft Numbering System Records Security Split SubForm Table Tables Time Difference Utility WScript Workgroup database function msaccess wizards tutorial Access Emails and Alerts Access Fields Access How Tos Access Mail Merge Access2003 Accounting Year Action Animation Attachment Binary Numbers Bookmarks Budgeting ChDir Color Palette Common Controls Conditional Formatting Data Filtering Database Records Defining Pages Desktop Shortcuts Diagram Disk Dynamic Lookup Error Handler External Filter Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Message Box Monitoring Octal Numbers Operating System Paste Primary-Key Product Rank Reading Remove Rich Text Sequence SetFocus Summary Tab-Page Union Query User Users Water-Mark Word automatically commands hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar updating upload vba code