Link to home
Start Free TrialLog in
Avatar of Jeremy Campbell
Jeremy CampbellFlag for United States of America

asked on

How to highlight textboxes on continuous form using Got Focus/Lost Focus in access?

I set up my textboxes to highlight when On Got Focus and then change back to white On Lost Focus on my continuous form. The problem I notice is that when it highlights the textbox for the particular row it does the same for all of the rows.. Is there a way to highlight just within the detail row that the box is selected?

Here is my vba for On Focus and Lost Focus for one of the textboxes.

Private Sub AssemblySeq_GotFocus()

Me.AssemblySeq.BackColor = RGB(153, 204, 255)

End Sub

Private Sub AssemblySeq_LostFocus()

Me.AssemblySeq.BackColor = vbWhite

End Sub



Thanks for the help!
Avatar of Bill Ross
Bill Ross
Flag of United States of America image

Hi,

This is normal operation.  Note that in a continuous form all text boxes have the same name per record so when you change the text box property of Me.AssemblySeq you are referring to each one of them per record.

Regards,

Bill
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jeremy Campbell

ASKER

Oh geez that is fantastic... I never even noticed the Got Focus option in there.. Learn something new every day.