I'm pretty sure this goes in here but if not admins please move to Access General Discussion.
So we all know access has conditional formating but it only allows 3 and I've looked all over for any sample coding or anything I could use but it doesn't allow me to change the Backcolor of the Text box/Combo Box on the form when it's a Continuous Form unless it's in conditional formatting but I'm not sure what I'm doing wrong or where I need to start.
Private Sub Form_Load()
Company.SetFocus
If Me.Company.Text = "COP" Then
Me.Company.BackColor = RGB(255, 0, 0)
End If
End Sub
I know this would normally work on VBA for forms but this is Access and seems hard for VBA and it's something that would be very nice.
Please let me know, I've heard "Expression Is" but didn't find anything on that, I'm not sure if I can create a conditional format let it run and then delete it and add a new one (Figured it would just remove the other one and create the new one).
Thanks guys and sorry if this seems a newbish question I am new but I really want to learn.
Degalle
So we all know access has conditional formating but it only allows 3 and I've looked all over for any sample coding or anything I could use but it doesn't allow me to change the Backcolor of the Text box/Combo Box on the form when it's a Continuous Form unless it's in conditional formatting but I'm not sure what I'm doing wrong or where I need to start.
Private Sub Form_Load()
Company.SetFocus
If Me.Company.Text = "COP" Then
Me.Company.BackColor = RGB(255, 0, 0)
End If
End Sub
I know this would normally work on VBA for forms but this is Access and seems hard for VBA and it's something that would be very nice.
Please let me know, I've heard "Expression Is" but didn't find anything on that, I'm not sure if I can create a conditional format let it run and then delete it and add a new one (Figured it would just remove the other one and create the new one).
Thanks guys and sorry if this seems a newbish question I am new but I really want to learn.
Degalle