Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Label Animation Zoom-out Fade

Introduction.

Computer Programming is interesting because when you start doing something it will definitely lead to more than that and give you more ideas to try different things all the time. I have started with the Label Animation methods and thought of presenting one or two tricks, but we have gone through five different animation methods by now.

We are going to learn one more trick with the same Form and Labels, which we have used last week. All you need to do is to copy the new VBA Code given below into the Code Module of the Form.

A sample image of the Run of the Program is given below:

In this method, the Color of each letter of the Employee's name is slowly fading away in the distance. The size of each letter of the name is getting reduced at each step and the letters are displayed at a fixed time interval giving it an animated and three-dimensional effect.

Links to earlier Animation Styles.

If you have not tried out the earlier Label animation methods you may take a look at them by visiting the following pages:

  1. Label Animation Style-1
  2. Label Animation Style-2
  3. Label Animation Variant
  4. Label Animation Zoom-in Style
  5. Label Animation in Colors

Let us try the new method.

The Design Task.

  1. Make a copy of the Employees Form we have used last week with twenty small labels with the Name Property set with the Values lbl01 to lbl20.

    A sample image of the Form is given below for reference:

  2. Open the Employees Form you have copied in Design View.

  3. Display the Code Module of the Form (View - -> Code).

  4. Copy and paste the following VBA Code into the Module, over-writing the existing Code:

    The Form Module Code.

    Option Compare Database
    Option Explicit
    
    Dim j, txtName, ctrl As Label, i
    
    
    Private Sub Form_Current()
    Dim t, xRGB As Long, fsize
    
    txtName = UCase(Me![first name] & " " & Me![Last name])
    fsize = 22
    For j = 1 To 20
       Set ctrl = Me("lbl" & Format(j, "00"))
       ctrl.FontSize = fsize
       ctrl.Caption = ""
       fsize = fsize - 1
    Next
       
    xRGB = RGB(10, 10, 10)
    i = xRGB
    For j = 1 To Len(txtName)
       Set ctrl = Me("lbl" & Format(j, "00"))
       xRGB = xRGB + i
       ctrl.ForeColor = xRGB
       ctrl.Caption = Mid(txtName, j, 1)
       
    t = Timer
    Do While Timer < t + 0.1
      DoEvents
    Loop
    
    Next
    
    End Sub
  5. Save the Form with the Code and open it in the normal view.

  6. Use the Record Navigation Button and move the record forward or back and watch how the Employee name is displayed on the header of the form.

  1. Textbox and Label Inner Margins
  2. Animating Label on Search Success
  3. Label Animation Style-1
  4. Label Animation Style-2
  5. Label Animation Variant
  6. Label Animation Zoom-in Style
  7. Label Animation in Colors
  8. Label Animation Zoom-out Fade
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