Pass Combo Box values to report

  • Follow


I have a form that passes criteria to a report.
A combo box selects from a table with two fields code, description.
Two questions
1. On selecting a code it would be nice to print the description for the 
code selected alongside the combo box in the form.
2. I can pass the code to the report, how can I pass on the description as 
well.

Thanks
CJ
0
Reply Utf 4/4/2007 1:52:08 PM

Create a query using your exising table and also the combo's RowSource 
table. This way you can add description field to the query grid.

Then open your report in design view, and set its Record Source property to 
the name of the query. Since the description field is in the query, you can 
now use it in the report.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"SeeJay" <SeeJay@discussions.microsoft.com> wrote in message
news:3F67B55B-62BC-4C1B-8ECF-2238A70AB238@microsoft.com...
>I have a form that passes criteria to a report.
> A combo box selects from a table with two fields code, description.
> Two questions
> 1. On selecting a code it would be nice to print the description for the
> code selected alongside the combo box in the form.
> 2. I can pass the code to the report, how can I pass on the description as
> well.
>
> Thanks
> CJ 

0
Reply Allen 4/4/2007 2:19:10 PM


Understand the principle thank you 

How do I add the combo's row source to the new query?

Thanks

"Allen Browne" wrote:

> Create a query using your exising table and also the combo's RowSource 
> table. This way you can add description field to the query grid.
> 
> Then open your report in design view, and set its Record Source property to 
> the name of the query. Since the description field is in the query, you can 
> now use it in the report.
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "SeeJay" <SeeJay@discussions.microsoft.com> wrote in message
> news:3F67B55B-62BC-4C1B-8ECF-2238A70AB238@microsoft.com...
> >I have a form that passes criteria to a report.
> > A combo box selects from a table with two fields code, description.
> > Two questions
> > 1. On selecting a code it would be nice to print the description for the
> > code selected alongside the combo box in the form.
> > 2. I can pass the code to the report, how can I pass on the description as
> > well.
> >
> > Thanks
> > CJ 
> 
> 
0
Reply Utf 4/4/2007 2:38:01 PM

1. Click the Query tab of the database window.
2. Click New.
3. Choose Design View.
4. In the Add table dialog, add both tables (i.e. the one that you want to 
use, and also the one that contains the 2 fields for the combo.)

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"SeeJay" <SeeJay@discussions.microsoft.com> wrote in
news:0CDDDA64-B4B9-4F97-BABF-9937404FF0AC@microsoft.com...
> Understand the principle thank you
>
> How do I add the combo's row source to the new query?
>
> Thanks
>
> "Allen Browne" wrote:
>
>> Create a query using your exising table and also the combo's RowSource
>> table. This way you can add description field to the query grid.
>>
>> Then open your report in design view, and set its Record Source property 
>> to
>> the name of the query. Since the description field is in the query, you 
>> can
>> now use it in the report.
>>
>> "SeeJay" <SeeJay@discussions.microsoft.com> wrote in message
>> news:3F67B55B-62BC-4C1B-8ECF-2238A70AB238@microsoft.com...
>> >I have a form that passes criteria to a report.
>> > A combo box selects from a table with two fields code, description.
>> > Two questions
>> > 1. On selecting a code it would be nice to print the description for 
>> > the
>> > code selected alongside the combo box in the form.
>> > 2. I can pass the code to the report, how can I pass on the description 
>> > as
>> > well. 

0
Reply Allen 4/4/2007 2:50:12 PM

3 Replies
585 Views

(page loaded in 0.094 seconds)

Similiar Articles:
















7/23/2012 11:31:45 AM


Reply: