We help IT Professionals succeed at work.
Get Started

MS Access Change Textbox Background Color Depending on Another Textbox Value On a Continuous Form

Dustin Stanley
Last Modified: 2017-11-01
I have a subform for notes. In this subform it has a combo box for choosing Private or Public. I would like to have my notes background to change color depending upon if the notes are Private or Public for easy distinction between the two types.

My only issue is how do I make the continuous form have different background colors for each record while they are all showing in a continuous form display?

Something like:
If Me!txtPrivatePublicID.Value = "1" Then
   Me!txtSourceSkuNote.BackColor = vbYellow
 End If
  If Me!txtPrivatePublicID.Value = "2" Then
     Me!txtSourceSkuNote.BackColor = vbBlue
  End If

Open in new window

 If Forms!frmSKuSource!frmSourceSkuNotes.Form!txtPrivatePublicID.Value = "1" Then
   Forms!frmSKuSource!frmSourceSkuNotes.Form!txtSourceSkuNote.BackColor = vbYellow
 End If
  If Forms!frmSKuSource!frmSourceSkuNotes.Form!txtPrivatePublicID.Value = "2" Then
     Forms!frmSKuSource!frmSourceSkuNotes.Form!txtSourceSkuNote.BackColor = vbBlue
  End If

Open in new window

Thanks for the help!
Watch Question
Remote Training and Programming
Top Expert 2015
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE