troubleshooting Question

How do I make this change only the record showing and not all?

Avatar of Megin
Megin asked on
Microsoft Access
16 Comments3 Solutions413 ViewsLast Modified:
I am using the following code to make items in my form have a grey forecolor when the status combo41 says "Off Project." The problem now is that when I change one record to "Off Project" every record in the system turns grey.

Here is the code:

Private Sub Combo41_AfterUpdate()
If Me.Combo41 = "Off Project" Then
    Me.[First Name].ForeColor = RGB(204, 204, 204)

    Me.[Last Name].ForeColor = RGB(204, 204, 204)
    
    Me.[E-mail Address].ForeColor = RGB(204, 204, 204)
    
    Me.[Non Wsdot Email Address].ForeColor = RGB(204, 204, 204)
    
    Me.[Phone].ForeColor = RGB(204, 204, 204)
    Me.[Mobile Phone].ForeColor = RGB(204, 204, 204)
    Me.[WSDOTOrg].ForeColor = RGB(204, 204, 204)
    Me.[WSDOT Manager].ForeColor = RGB(204, 204, 204)
    Me.[Combo39].ForeColor = RGB(204, 204, 204)
    Me.[Firm Information].ForeColor = RGB(204, 204, 204)
    Me.[Phone Number_CompanyInfo].ForeColor = RGB(204, 204, 204)
    Me.[Reports to].ForeColor = RGB(204, 204, 204)
    Me.[Assigned Admin].ForeColor = RGB(204, 204, 204)
    Me.[Text54].ForeColor = RGB(204, 204, 204)
    Me.[Text493].ForeColor = RGB(204, 204, 204)
    Me.[Office].ForeColor = RGB(204, 204, 204)
    Me.[Combo41].ForeColor = RGB(204, 204, 204)
    Me.[Direct Connect Number].ForeColor = RGB(204, 204, 204)
  
    
   
Else

   Me.[First Name].ForeColor = RGB(0, 0, 0)

   Me.[Last Name].ForeColor = RGB(0, 0, 0)
   
   Me.[E-mail Address].ForeColor = RGB(0, 0, 0)
   
   Me.[Non Wsdot Email Address].ForeColor = RGB(0, 0, 0)
   
   Me.[Phone].ForeColor = RGB(0, 0, 0)
   Me.[Mobile Phone].ForeColor = RGB(0, 0, 0)
   Me.[WSDOTOrg].ForeColor = RGB(0, 0, 0)
   Me.[WSDOT Manager].ForeColor = RGB(0, 0, 0)
   Me.[Combo39].ForeColor = RGB(0, 0, 0)
   Me.[Firm Information].ForeColor = RGB(0, 0, 0)
   Me.[Phone Number_CompanyInfo].ForeColor = RGB(0, 0, 0)
   Me.[Reports to].ForeColor = RGB(0, 0, 0)
   Me.[Assigned Admin].ForeColor = RGB(0, 0, 0)
   Me.[Text54].ForeColor = RGB(0, 0, 0)
   Me.[Text493].ForeColor = RGB(0, 0, 0)
   Me.[Office].ForeColor = RGB(0, 0, 0)
   Me.[Combo41].ForeColor = RGB(0, 0, 0)
   Me.[Direct Connect Number].ForeColor = RGB(0, 0, 0)
   
   
   
   
   
End If

End Sub


Is this something simple, like defining the other all the other options in that box as being black with more if statements?

Thank you!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros