Formatting

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.
 
G

Guest

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" έγγÏαψε:
 
G

Guest

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" έγγÏαψε:
 
S

Steve Schapel

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top