when i was messing around with this--i had to change the label to a text box for it to change to bold.
i used the 400/700 thing for normal/bold
problem is that when i moved to 'lable' to change it to bold, of course then your text box looses focus, and turns back to white. you dont even see it turn grey it's so fast. so i tried calling function in OnEnter and OnExit, but same thing. and for sure dont make the last line setfocus back to the text box control, it's an endless loop.
so, here's my code, tho you'll still have to work on the focus issue. i found like i said that you can't make a LABEL bold, you have to make it a text box, then controlsource is '="Date:" or whatever. i'm assuming you are naming the orig text boxes for example
txtTextBox
and it's associated 'label' is named i.e.
lblTextBox
this code will parse out the name of the control and figure out the name of the label, pass control to the 'label' and make it bold. again, you'll have to mess around with focus issue.
Code:
Dim ctl As Control
Dim ctlName
Dim LabelName
Set ctl = Me.ActiveControl
If ctl.BackColor = 16777215 Then
ctl.BackColor = 14211021
Else
ctl.BackColor = 16777215
End If
'Determine name of associated label and go to it
ctlName = Me.ActiveControl.Name
LabelName = "lbl" & Right(Me.ActiveControl.Name, Len(Me.ActiveControl.Name) - 3)
DoCmd.GoToControl LabelName
Dim ctlLabel As Control
Set ctlLabel = Me.ActiveControl
If ctlLabel.FontWeight = 400 Then 'Normal
ctlLabel.FontWeight = 700 'Bold
Else
ctlLabel.FontWeight = 400 'Normal
End If
good luck--g