PDA

View Full Version : Expression Builder in Access Reports



Packin31
11-02-2011, 08:07 AM
Ok this is probably a simple one for you Access gurus.

I have added a Text Box to a report
Control Source = RATING OR SCHEDULE

When I click preview the results come out as -1. I go back to the control source it had changed to
=[rating] Or [schedule]

What expression do I need to have it to read and place either Rating or Schedule in the report?
or
Should I just create two separate text boxes?

tkmashl
11-02-2011, 08:17 AM
I would try two separate boxes... One column next to the other wouldn't be too awkward.

I think you can do what you would want with some conditional statements but I'm not sure how to make it work,

hth

TKM

grinch2000cs
11-02-2011, 08:41 AM
Is the rating a field in your query? Your report should have a record source that is pointed to a query. If you have the rating in that query then what you have done should work. I have a document that I put together on how to build custom reports in AutoPLANT, let me see if I can find it.

Packin31
11-02-2011, 08:47 AM
TKM and Grinch

Thanks for your feedback.

If I did just rating it works. Same for schedule but when I add the or between the two I get the -1.

For now I think I will just do two separate boxes. Need to get these new specs printed and checked since these new projects are HOT.

grinch2000cs
11-02-2011, 09:26 AM
Oh i see what you are doing now, you want either Schedule or Rating depending on what the component has. I would do what TKM suggest. I don't think you can get both in the column depending if it has it or not without a bit of coding.

Packin31
11-02-2011, 01:22 PM
Tkm suggestion worked good great

Grinch
I really appreciate your input.