By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 2,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Formating the SubForm

ammoos
100+
P: 100
Hi Friends

I need to format the Subform in a form.

The subform contains 2 columns and first column is name and second is age.

If the age is above 20 then the corresponding names should display in a blue color and the other names thatís the age under 20 will show in black...

I have no idea about how its possible

pls help me as soon as possible

thanks

Ammoos
Feb 29 '08 #1
Share this Question
Share on Google+
8 Replies


Delerna
Expert 100+
P: 1,134
Hi amoos
check this thread and see if it helps
Feb 29 '08 #2

ammoos
100+
P: 100
HI Delerna

Many thanks for your reply. I want to format the subform when its load first time. I mean when its first display in front of the user. How can it possible. Si I think the formating codes will apply just after the recordsource is set.. pls advice me..

thanks

Ammoos
Feb 29 '08 #3

ammoos
100+
P: 100
Pls.................................. help me
Mar 3 '08 #4

Expert Mod 2.5K+
P: 2,545
Pls.................................. help me
Hi Ammoos. I read your post and Delerna's reply, which is good advice. The thread he points you to covers conditional formatting, which is exactly what you need to change the font colour when a control value is under a particular threshold.

Your subsequent reply is difficult to interpret - you mention formatting before the recordsource is set, but when there is no recordsource there are no values to display. As this does not make sense can you explain further what you mean?

-Stewart
Mar 3 '08 #5

ammoos
100+
P: 100
Hi Stewart

I mentioned clearly as I want to format the subform after setting the recordset..

Can u pls advice

Hi Ammoos. I read your post and Delerna's reply, which is good advice. The thread he points you to covers conditional formatting, which is exactly what you need to change the font colour when a control value is under a particular threshold.

Your subsequent reply is difficult to interpret - you mention formatting before the recordsource is set, but when there is no recordsource there are no values to display. As this does not make sense can you explain further what you mean?

-Stewart
May 5 '08 #6

missinglinq
Expert 2.5K+
P: 3,532
If the age is above 20 then the corresponding names should display in a blue color and the other names thatís the age under 20 will show in black...
And when the age is exactly 20, what color?

Presumably your your subform is either Continuous or Datasheet View, so the easiest way to do conditional formatting will be thru the menu. Open the form used as the subform in Design View and select the field that holds your names, then, on the menu
  1. Goto Format - Conditional Formatting
  2. Condition1
  3. Expression Is [AgeFieldName]< 20
  4. Select Black as the Fore Color
  5. Click on Add
  6. Condition2
  7. Expression Is [AgeFieldName]> 20
  8. Select Blue as the Fore Color
If you want a third color if Age = 20 what you do depends on whether it's a Datasheet View or a Continuous View.

If it's Continuous, you can simply change the color that's now displayed at the top of the Conditional Formatting Dialog box for Default Formatting.

If it's Datasheet View you'll have to Add the
Condition3
Expression Is [AgeFieldName] = 20
Then select your color

Linq ;0)>
May 5 '08 #7

ammoos
100+
P: 100
Thanks much Missinglinq..
May 7 '08 #8

missinglinq
Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
May 7 '08 #9

Post your reply

Sign in to post your reply or Sign up for a free account.