change property on subform

  • Thread starter hireagenius via AccessMonster.com
  • Start date
H

hireagenius via AccessMonster.com

Hi and thank you for your time,
I have a form/subform with a one to many relationship. In the subform, I
have fields Oct, Nov, Dec, etc in each record. I want to compare the Nov
date to the Oct date and change the BackColor if the dates do not equal. The
code works for the current record but the Backcolor will also change in the
next record on the many side without making the proper comparison.
I have the following code on the On Current property of the subform.

Let Nov.BackColor = 123
If Me.Nov.Value > Me.Oct.Value Then
Me.Nov.Backcolor = 456
End If

So, the Nov Backcolor will change to 123 if Nov is greater than Oct. But it
will also change in the next record, whether or not Nov is greater than Oct.
 
A

Allen Browne

Remove the code, and use conditional formatting instead.

In design view, right-click the text box, and choose Conditional Formatting.
 
H

hireagenius via AccessMonster.com

Allen, I
s it that you can't use VBA code? It is my preference for other reasons
rather than conditional formatting.
Thank you
Carla



Allen said:
Remove the code, and use conditional formatting instead.

In design view, right-click the text box, and choose Conditional Formatting.
Hi and thank you for your time,
I have a form/subform with a one to many relationship. In the subform, I
[quoted text clipped - 15 lines]
will also change in the next record, whether or not Nov is greater than
Oct
 
A

Allen Browne

If you use the code, it will apply to every instance of the text box (i.e.
every row of your continuous form.)

CF doesn't have that problem, so it would seem to be the solution you are
looking for.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


hireagenius via AccessMonster.com said:
Allen, I
s it that you can't use VBA code? It is my preference for other reasons
rather than conditional formatting.
Thank you
Carla



Allen said:
Remove the code, and use conditional formatting instead.

In design view, right-click the text box, and choose Conditional
Formatting.
Hi and thank you for your time,
I have a form/subform with a one to many relationship. In the subform,
I
[quoted text clipped - 15 lines]
will also change in the next record, whether or not Nov is greater than
Oct
 
T

tom_willpa

high quality Soccer jerseys NBA Jersey tracksuit and jackets, GHD
hairstraightener supplier from www.willpa.com

Are you a Retail businessman who bother by the purchase price? China
Cheapest TOP wholesale website can help you

we are specialize in replica sport goods manufacturing in china, we can
offer you all kinds of soccer jersey, NBA jersey,shoes and so on. they are
the best brand replica goods whih are look the same as the original goods.
excellent quality and steady supply for them. we have been marketed in Europe
and American for 3 year. all the goods we offer are AAA quality. our soccer
jersey are Thailand style. If any goods you buy from my company have problem,
we will refund or resend them again. Most of ourProducts have no minimum
order requirements,soyou can shop retail goods at wholesale prices. if you
can buy more than 300usd. We offer free shipping. The more you buy the more
discount for you.

National soccer jerseys: http://www.willpa.com
Club soccer jerseys: http://www.willpa.com
NBA Jerseys: http://www.willpa.com
T-shirt and shirt: http://www.willpa.com
Tracksuit: http://www.willpa.com
Hoody & Jackets: http://www.willpa.com
UGG boots: http://www.willpa.com
Hair style: http://www.willpa.com
shopping Index: http://www.willpa.com

EMS shipping. 7days arrive, paypal accept

want more information pls contact us or check our website: www.willpa.com
 

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