AboutRichard Rost Expertise I am happy to answer any kinds of questions about Microsoft Access - from basic table design to advanced VBA programming. Also, please feel free to check the Access Tips & Tricks section of my web site.
Education/Credentials I am a self-taught Access expert. I have been building databases for clients since the early 90s. You can see a sample of my Access Tutorials on my web site at 599CD.com
Question Hello, I have a pretty complex problem and I hope it possible to even achieve. Basically I have a form set up with 2 combo boxes, a cboFrom and a cboTo, the values in these combo boxes come from the same table, they're product codes. Each product code has some settings with it so the table is set up as:
Product code (key), Setting 1, Setting 2, Setting 3 etc...
I then want to set it up so just by clicking a button it will print a report with the values in the cboTo print on the parent report, while the values for the cboFrom will print in the subreport. Is this possible? I know how to filter the parent report, but I can't figure out how to filter a subreport at the same time. They're taking from the same table, just different records.
What I want to do, essentially is just display 2 rows, a FROM with their settings and a TO next to it. Would this be possible?
My level is intermediate, I can do coding and I understand it pretty well but I am completely dumb in queries, I've only used them very basically.
Thank you very much in advance!
Answer I wouldn't use a filter. Just set up two queries - one based on each of those combo boxes - then use those queries for your reports.
See:
If you want to refer to a value on a Form, you can use the notation:
Forms!FormName!FieldName
You can use this notation inside of queries, other forms, or even reports. I have a free tutorial that explains how to use this:
P.P.S. I volunteer my time at AllExperts to help people, and I get a LOT of questions, so I can't take an hour to answer each question. If you need more DETAILED HELP, come to my TechHelp web site at http://www.599cd.com/TechHelp/AllExperts and I'll take as much time as you need to answer your question.