Formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am wanting to set a format on an access form, which when I select or input
into a field the formatting to a number of boxes change, ie pending in one
box will change the persons name to blue.
 
Dear Gail,

On the AfterUpdate event of your drop down field (I use the name ctrl3, in
which if I select 1 it will change the text color of another field, named m1):

Private Sub ctrl3_AfterUpdate()
If ctrl3 = "1" Then

m1(change this to your field name).ForeColor = 16711680
Else
m1(change this to your field name.ForeColor = 0
End If

End Sub

Regards,

George


Ο χÏήστης "Gail" έγγÏαψε:
 
Thanks George I will give it a go

Gail

George said:
Dear Gail,

On the AfterUpdate event of your drop down field (I use the name ctrl3, in
which if I select 1 it will change the text color of another field, named m1):

Private Sub ctrl3_AfterUpdate()
If ctrl3 = "1" Then

m1(change this to your field name).ForeColor = 16711680
Else
m1(change this to your field name.ForeColor = 0
End If

End Sub

Regards,

George


Ο χÏήστης "Gail" έγγÏαψε:
 
Gail,

You can use Conditional Formatting for this. Using your example, select
the textbox for the person's name in the design view of the form, and
then select Conditional Formatting from the Format menu. Enter
'Expression is...' and then [YourOtherField]="Pending", and then set up
the colours you want.
 
Thanks Steve, nice simple solution to the problem

Gail

Steve Schapel said:
Gail,

You can use Conditional Formatting for this. Using your example, select
the textbox for the person's name in the design view of the form, and
then select Conditional Formatting from the Format menu. Enter
'Expression is...' and then [YourOtherField]="Pending", and then set up
the colours you want.

--
Steve Schapel, Microsoft Access MVP

I am wanting to set a format on an access form, which when I select or input
into a field the formatting to a number of boxes change, ie pending in one
box will change the persons name to blue.
 
Back
Top