Report wont get conditional formatted data (1 Viewer)

mikiel

Registered User.
Local time
Today, 15:17
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
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:17
Joined
Aug 30, 2003
Messages
36,118
Did you add the same conditional formatting expressions to the report?
 

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
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.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:17
Joined
Aug 30, 2003
Messages
36,118
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).
 

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
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.
 

JHB

Have been here a while
Local time
Today, 23:17
Joined
Jun 17, 2012
Messages
7,732
In MS-Access 2010, open the form in design view, choose "File" from the Ribbon, then "Save Object as", choose "Report".
 

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
Ja right its working like that too thank you.
 

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
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:

JHB

Have been here a while
Local time
Today, 23:17
Joined
Jun 17, 2012
Messages
7,732
I'm a little lost here, could you show (a picture or something similar) what you want to get?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 22:17
Joined
Feb 19, 2013
Messages
16,553
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]
 

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
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: 84

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
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
 

JHB

Have been here a while
Local time
Today, 23:17
Joined
Jun 17, 2012
Messages
7,732
Change "YourComboControlName" to the name you use for the ComboBox.

 

Attachments

  • FormatControl.jpg
    FormatControl.jpg
    44 KB · Views: 224

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
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: 76

JHB

Have been here a while
Local time
Today, 23:17
Joined
Jun 17, 2012
Messages
7,732
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

  • Database55.accdb
    388 KB · Views: 98

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:17
Joined
Aug 30, 2003
Messages
36,118
Does parent work outside VBA?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 22:17
Joined
Feb 19, 2013
Messages
16,553
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:

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:17
Joined
Aug 30, 2003
Messages
36,118
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.
 

mikiel

Registered User.
Local time
Today, 15:17
Joined
Jan 13, 2015
Messages
23
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

Top Bottom