Example Apps for Businesses, Schools & Developers

Click any image to view a larger version

Version 1.0           Approx 0.8 MB                 First Published 27 Sept 2021                 Last Updated 8 Jun 2022


This example app shows how a form can be opened at startup to display a set of randomly chosen tips.

NOTE:
1.   When the application tips form is displayed the rest of the screen is automatically dimmed to focus users' attention on the form

AppTips1

AppTips2

      Individual users may choose to hide the application tips by unticking the checkbox Always Show These Tips At Startup.

      The form dimmer effect is fully explained in another of my example apps: An Attention Seeking Database

2.   The information used for each tip is stored in a table tblAppTips

tblAppTips

3.   The code used to select a random tip and dim the rest of the screen is in the Form_Load event of the form frmAppTips:

      CODE:

Private Sub Form_Load()

On Error GoTo Err_Handler

      'check tips status
      If GetAppTipsStatus = True Then
            Me.chkShowTips = True
      Else
            Me.chkShowTips = False
      End If

      'set randomID to open with
      Randomize
      N = Int((DMax("ID", "tblAppTips") - DMin("ID", "tblAppTips") + 1) * Rnd + DMin("ID", "tblAppTips"))
      DoCmd.GoToRecord , , acGoTo, N
      Me.lblTipValue.Caption = "Tip " & N & " (of " & DMax("ID", "tblAppTips") & ")"

      RecordNumber = Me.ID
      cmdClose.SetFocus

      'dim background
      Form_frmDimmer.DoDim Me

Exit_Handler:
      Exit Sub

Err_Handler:
      MsgBox "Error " & Err & " in Form_Load procedure :" & Err.Description
      Resume Exit_Handler

End Sub



      When the tips form is closed, code in the Form_Unload event removes the dimmer effect to restore the 'normal' screen

Private Sub Form_Unload(Cancel As Integer)

On Error GoTo Err_Handler

      'undim to restore 'normal' screen display
      Form_frmDimmer.UnDim

Exit_Handler:
      Exit Sub
Err_Handler:
      MsgBox "Error " & Err & " in Form_Unload procedure :" & Err.Description
      Resume Exit_Handler
End Sub



      You will also need to import the form frmDimmer to your own application

4.   You are allowed to use or modify this code in your own applications.
      However, the code may not be resold by itself or as part of a larger project without the permission of Mendip Data Systems.



Download

      Click to download:       ApplicationTipsExample     ACCDB file       Approx 0.8 MB (zipped)



Feedback

      Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.

      Please also consider making a donation towards the costs of maintaining this website. Thank you



Colin Riddington           Mendip Data Systems                 Last Updated 8 Jun 2022



Return to Example Databases Page




Return to Top