Results 1 to 3 of 3
  1. #1
    BEI77 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Location
    KY
    Posts
    24

    Flashing text in multiple data fields on same form

    I am a novice user and have developed a database for stock car racing. One page is for analysis of tire temperature. I have placed fields that will show when the tires need air pressure and a camber change based on temperature analysis.


    I want these fields text to flash when an adjustment needs to be made.
    I am using the following code and can get 1 field (text49) to flash.
    I want to be able to make about 5 more fields to flash but cannot figure out how to do that.

    If Me.Text49.ForeColor = 255 Then
    Me.Text49.ForeColor = vbBlue
    Else
    Me.Text49.ForeColor = 255
    End If

    Any help would be apprectiated.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Off the top of my head, maybe something like this.

    In the timer event code:
    Code:
    'tire pressure
      If Me.TirePSI > 100 Then
         If Me.TirePSI.ForeColor = 255 Then
             Me.TirePSI.ForeColor = vbBlue
         Else
             Me.TirePSI.ForeColor = 255
         End If
      Else
         'not in alarm color
         Me.TirePSI.ForeColor = vbBlue
      End If
     
    'tire temperature
      If Me.TireTemp > 200 Then
         If Me.TireTemp = 255 Then
             Me.TireTemp = vbBlue
         Else
             Me.TireTemp = 255
         End If
      Else
         'not in alarm color
          Me.TireTemp.ForeColor = vbBlue
      End If
    
    
    'tire Camber degrees
      If Me.TireCamber > 5 Then
         If Me.TireCamber = 255 Then
             Me.TireCamber = vbBlue
         Else
             Me.TireCamber = 255
         End If
      Else
         'not in alarm color
          Me.TireCamber = vbBlue
      End If

    (Really should take the time to rename the controls - so much easier following the code)

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by BEI77 View Post

    ...I am using the following code and can get 1 field (text49) to flash...I want to be able to make about 5 more fields to flash but cannot figure out how to do that...
    As ssnafu showed you, you'd do it in the same manner, simply changing the name of the Textboxes.

    Having said that, flashing Controls are really a bad idea; among other things, they can make users with epilepsy (and many epileptics are unknown as such to their co-workers) have seizures! It should really suffice to do something like changing the BackColor of the Control to a stand out color, like red, and would also look much more professional. Easiest way to do this would probably be to use Conditional Formatting.

    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Main page Form flashing button
    By benh in forum Forms
    Replies: 2
    Last Post: 09-19-2014, 05:17 PM
  2. Replies: 13
    Last Post: 06-21-2012, 09:03 AM
  3. Replies: 3
    Last Post: 01-17-2012, 01:04 PM
  4. Replies: 1
    Last Post: 01-12-2012, 04:05 AM
  5. subclassing a form to control flashing
    By swt1951swt in forum Forms
    Replies: 0
    Last Post: 07-14-2009, 05:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums