Report wont get conditional formatted data

mikiel

Registered User.
Local time
Today, 14:25
Joined
Jan 13, 2015
Messages
23
Hi
I have made some conditional formatting in text fields, when I check the checkbox the entire row gets color RED in the Form. But when I go to the report I don't get them colored just normal.
Please how to solve this in MS access database 2007
 
Did you add the same conditional formatting expressions to the report?
 
Thank you for your reply: now after you mentioned this I did try that and now its working. I thought it would take the action from the form directly.
 
No problem. Unless you created the report from the form, they are separate objects (they would still be separate objects, but the report could inherit rules and properties if it was created from the form).
 
Hello again and thank you , I don't know how to make it inherit from the form but I have tried to make sure to inherit from the table or the query but it did not get the conditional formatting. Which means I had to do the same conditional formatting in the report field by field that i did in the form.
 
In MS-Access 2010, open the form in design view, choose "File" from the Ribbon, then "Save Object as", choose "Report".
 
Ja right its working like that too thank you.
 
What if I want to pick a name from a combo box from the header section then it will make it COLORED in the Continuous form in the detail section. any idea how to set this up in the conditional formatting or elsewhere. thank you
 
Last edited:
I'm a little lost here, could you show (a picture or something similar) what you want to get?
 
your conditional formatting rule would be something like

Expression is...[namefield]=[parent].[cboNamefield]

or if your combo has a hidden PK column (they usually do)

Expression is...[PK]=[parent].[cboNamefield]
 
this is an example when I chose a name from the combo box I want it to highlight or make the row colored RED.
thank you
 

Attachments

  • test.png
    test.png
    7.9 KB · Views: 185
your conditional formatting rule would be something like

Expression is...[namefield]=[parent].[cboNamefield]

what do you mean by [parent] what should I put instead of this? thank you
 
Change "YourComboControlName" to the name you use for the ComboBox.

attachment.php
 

Attachments

  • FormatControl.jpg
    FormatControl.jpg
    44 KB · Views: 336
thank you for your reply:
i have done as you said but its not working look at the image please....
 

Attachments

  • Untitled.png
    Untitled.png
    52.5 KB · Views: 178
I've made an example for you in the attached database, (remember to choose a value in the combobox).
If you still can't get it post your database.
 

Attachments

Does parent work outside VBA?
 
Does parent work outside VBA?
it does in the context of conditional formatting and you can use it in a controlsource to a form - for example calculating a customer specific discount based on a rate held in the mainform recordsource. Don't know about anywhere else.

Edit: have also used it in a rowsource for list and combo box in a subform (needs to be requeried) e.g.

SELECT * FROM myTable WHERE somefield=[parent].[someotherfield]
 
Last edited:
Thanks. Wasn't sure it would work and wasn't near a computer to test. I thought it may be like "Me". In the Access Web link, all the uses of Parent are also with Me, so it didn't help.
 
I've made an example for you in the attached database, (remember to choose a value in the combobox).
If you still can't get it post your database.

Many thanks its working now I guess i must do the same for the report as well but with query, Am I right?
 

Users who are viewing this thread

Back
Top Bottom