'Pulsing/Flashing' on Forms is generally not done because it needlessly uses resources and it can trigger seizures in susceptible users! Not cool!
I'm assuming you only want to so this while the Control is empty, otherwise you could simply set its BackColor to whatever you want, in Design View. Drawing attention to a Control, when it's unpopulated, can simply done by changing the BackColor of the target Control, using Conditional Formatting:
In Form Design View:
- Right-Click the Target Control
- Click on Conditional Formatting
- Under Condition 1 select Expression Is from the dropdown box
- In the condition box, to the right, enter Nz(TextboxName],"")="", replacing TextboxName with the actual name, and including the Square Brackets
- Select the formatting you desire using the BackColor (the paint bucket) icon
- Click on OK
Linq ;0)>
Hello Linq,
Thank you for your reply.
When I suggested Pulsing/Flashing all I wanted was a gentil glow (by using transparency maybe?) and to pulse just a couple times and then stop and stay a light yellow color for the text box background.
I did not mean to be uncool and cause seizures!
Anyway, if there is a way to do this please let me know.
Thanks
Linda
'Pulsing/Flashing' on Forms is generally not done because it needlessly uses resources and it can trigger seizures in susceptible users! Not cool!
I'm assuming you only want to so this while the Control is empty, otherwise you could simply set its BackColor to whatever you want, in Design View. Drawing attention to a Control, when it's unpopulated, can simply done by changing the BackColor of the target Control, using Conditional Formatting:
In Form Design View:
- Right-Click the Target Control
- Click on Conditional Formatting
- Under Condition 1 select Expression Is from the dropdown box
- In the condition box, to the right, enter Nz(TextboxName],"")="", replacing TextboxName with the actual name, and including the Square Brackets
- Select the formatting you desire using the BackColor (the paint bucket) icon
- Click on OK
Linq ;0)>
Still not sure what 'gentle glow' means, but this will change a the BackColor of aTextbox from White to Yellow and back, three times, when the Form first loads, then keep it White:
Code:Private Sub Form_Load() Me.TimerInterval = 200 End Sub
Code:Private Sub Form_Timer() Static i As Integer If i > 4 Then Me.TimerInterval = 0 Me.Alert.BackColor = vbWhite Exit Sub End If With Me.Alert 'If the color is White, the color is Yellow, otherwise the color is White! .BackColor = (IIf(.BackColor = vbWhite, vbYellow, vbWhite)) End With i = i + 1 End Sub
Replace Alert, in the code, with the actual name of your Textbox.
Textboxes on the Form I tested this on had a White BackColor; if yours is different you'll have to make an adjustment to that. And, of course, you can choose something other than Yellow for the alternate Color.
Linq ;0)>