Solved Create Blinking Control backcolor (1 Viewer)

Sarah.M

Member
Local time
Today, 10:00
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is blocked by IT for security reason (Cybersecurity).
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
----------------------------------------------
I want to make [Code1] txtbox control to be blinked (Flashing) if the value is more than 0, but it dose work with me can you help me plz 🙏
Look at form1 Timer On macro event

sample attached
 

Attachments

  • BackColor.accdb
    960 KB · Views: 175

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:00
Joined
May 7, 2009
Messages
19,169
it will not work without VBA, because it will use Timer Event to display text in Normal/Contrast color (to make it appear blinking).
try using Conditional Format to change the Background/Foreground color on your Condition. but it will never blink.
 

GinaWhipp

AWF VIP
Local time
Today, 03:00
Joined
Jun 21, 2011
Messages
5,901
As a side note, I caution against blinking (flashing) as for some people it triggers physical reactions. I tend to just make the border turn red and push them back to said control if they try to go to another record including a new one.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 02:00
Joined
Feb 28, 2001
Messages
27,001
Hadn't thought about it, but Gina is right. Flashing - if bright enough, fast enough, or big enough (or any combination) can trigger latent epilepsy.

For the color codes that we use to color forms, reports, controls, etc., there is no "flashing" bit because the display modes that have such abilities are unsuitable for use with Access. More specifically, there is no display mode used by Windows NT or later that I recall that has a flasher ability. IF you could somehow uncover the old DOS-level hardware display modes that recognized flasher bits, you would have something like 16 colors and character graphics only. Ever since the advent of WinNT, those display modes have been highly restricted. But it doesn't matter if Windows allowed it because Access displays cannot work with those display modes anyway. Those modes don't have the pixel-level graphics capabilities that Access requires. That window mode that gives you up to 16 million colors does not include a flasher bit among the abilities of that display mode. That means "no hardware support."

So the traditional way to do this is to program the timer event to alternate between two colors every half-second or full second or some other time. But that requires VBA, which you say is blocked for your machine.

So to condense that into a simple answer:

I want to make [Code1] txtbox control to be blinked (Flashing) if the value is more than 0, but it dose work with me can you help me plz

No. No path exists from where you are to where you want to be.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:00
Joined
May 7, 2009
Messages
19,169
well i am wrong, it can be done after all.
warning!!! consult your doctor before testing or if symptoms persist.
 

Attachments

  • BackColor.accdb
    960 KB · Views: 162

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:00
Joined
May 7, 2009
Messages
19,169
change the first If to:

If Nz(Code1, 0) > 0

also you add an ElseIf to the first If, so that the text will be black/on white background when the value is 0.
if.png
 

Users who are viewing this thread

Top Bottom