A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Choose Report through command button



 
 
Thread Tools Display Modes
  #1  
Old February 25th, 2006, 11:44 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Choose Report through command button

Hi!

I have one form with 4 sequential combos: CboType, Cbo2, Cbo3 and Cbo4.
In the end of the research, one listbox shows us the result.
In adition, I have 5 Reports, one for each Type, chosen in the CboType.
Each Type has different fields, therefore, different Reports.
It would like:
With one command button in form, in the end of the research,
to open the corresponding Report to the Type chosen in the Cbo1.

Thanks in advance.
an
  #2  
Old February 26th, 2006, 12:24 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Choose Report through command button

One solution: In your RowSource for cboType, have a column with the name of
the report desired. You don't need to display it and can set it's column
width to zero. If it is the 3rd column in your RowSource your code on the
click event of the Cmd button could be:

DoCmd.OpenReport cboType.Column(2)

The column index is zero-based which means that column(2) is the third
column.
HTH
--
sam


"an" wrote:

Hi!

I have one form with 4 sequential combos: CboType, Cbo2, Cbo3 and Cbo4.
In the end of the research, one listbox shows us the result.
In adition, I have 5 Reports, one for each Type, chosen in the CboType.
Each Type has different fields, therefore, different Reports.
It would like:
With one command button in form, in the end of the research,
to open the corresponding Report to the Type chosen in the Cbo1.

Thanks in advance.
an

  #3  
Old February 26th, 2006, 12:46 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Choose Report through command button

smK23,

Thanks for your reply.

I am a little confused because in the RowSouce of query I have:

SELECT DISTINCT Q_MultiField.Type FROM Q_MultiField ORDER BY
Q_MultiField.Type;

an


"smk23" wrote:

One solution: In your RowSource for cboType, have a column with the name of
the report desired. You don't need to display it and can set it's column
width to zero. If it is the 3rd column in your RowSource your code on the
click event of the Cmd button could be:

DoCmd.OpenReport cboType.Column(2)

The column index is zero-based which means that column(2) is the third
column.
HTH
--
sam


"an" wrote:

Hi!

I have one form with 4 sequential combos: CboType, Cbo2, Cbo3 and Cbo4.
In the end of the research, one listbox shows us the result.
In adition, I have 5 Reports, one for each Type, chosen in the CboType.
Each Type has different fields, therefore, different Reports.
It would like:
With one command button in form, in the end of the research,
to open the corresponding Report to the Type chosen in the Cbo1.

Thanks in advance.
an

  #4  
Old February 26th, 2006, 01:22 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Choose Report through command button

Can you add a column to the table Q_MultiField and put the name of the
report to call there?
Then change the RowSource to "SELECT DISTINCT Q_Mutifield.Type,
Q_Multifield.ReportName FROM ..."

Change the number of columns to 2
set the column width of the second item to zero.
Since you only have two columns, you would use

DoCmd.OpenReport cboType.Column(1)


--
sam


"an" wrote:

smK23,

Thanks for your reply.

I am a little confused because in the RowSouce of query I have:

SELECT DISTINCT Q_MultiField.Type FROM Q_MultiField ORDER BY
Q_MultiField.Type;

an


"smk23" wrote:

One solution: In your RowSource for cboType, have a column with the name of
the report desired. You don't need to display it and can set it's column
width to zero. If it is the 3rd column in your RowSource your code on the
click event of the Cmd button could be:

DoCmd.OpenReport cboType.Column(2)

The column index is zero-based which means that column(2) is the third
column.
HTH
--
sam


"an" wrote:

Hi!

I have one form with 4 sequential combos: CboType, Cbo2, Cbo3 and Cbo4.
In the end of the research, one listbox shows us the result.
In adition, I have 5 Reports, one for each Type, chosen in the CboType.
Each Type has different fields, therefore, different Reports.
It would like:
With one command button in form, in the end of the research,
to open the corresponding Report to the Type chosen in the Cbo1.

Thanks in advance.
an

  #5  
Old February 26th, 2006, 01:36 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Choose Report through command button


But I have 4 different reports, because they are differents fields,
consonant the type...
an

"smk23" wrote:

Can you add a column to the table Q_MultiField and put the name of the
report to call there?
Then change the RowSource to "SELECT DISTINCT Q_Mutifield.Type,
Q_Multifield.ReportName FROM ..."

Change the number of columns to 2
set the column width of the second item to zero.
Since you only have two columns, you would use

DoCmd.OpenReport cboType.Column(1)


--
sam


"an" wrote:

smK23,

Thanks for your reply.

I am a little confused because in the RowSouce of query I have:

SELECT DISTINCT Q_MultiField.Type FROM Q_MultiField ORDER BY
Q_MultiField.Type;

an


"smk23" wrote:

One solution: In your RowSource for cboType, have a column with the name of
the report desired. You don't need to display it and can set it's column
width to zero. If it is the 3rd column in your RowSource your code on the
click event of the Cmd button could be:

DoCmd.OpenReport cboType.Column(2)

The column index is zero-based which means that column(2) is the third
column.
HTH
--
sam


"an" wrote:

Hi!

I have one form with 4 sequential combos: CboType, Cbo2, Cbo3 and Cbo4.
In the end of the research, one listbox shows us the result.
In adition, I have 5 Reports, one for each Type, chosen in the CboType.
Each Type has different fields, therefore, different Reports.
It would like:
With one command button in form, in the end of the research,
to open the corresponding Report to the Type chosen in the Cbo1.

Thanks in advance.
an

  #6  
Old February 26th, 2006, 02:23 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Choose Report through command button

I understood from your original post that each selection in cbotype had a
different report:

In adition, I have 5 Reports, one for each Type, chosen in the CboType.


Do you have 5 items in your list for cboType, and are each of those items
associated with a different report? If that is not the case, you will need a
different solution.

In the code for your command button:
You can use a "SELECT Case" statement and specify the parameters required to
select the desired report.
--
sam


"an" wrote:


But I have 4 different reports, because they are differents fields,
consonant the type...
an

"smk23" wrote:

Can you add a column to the table Q_MultiField and put the name of the
report to call there?
Then change the RowSource to "SELECT DISTINCT Q_Mutifield.Type,
Q_Multifield.ReportName FROM ..."

Change the number of columns to 2
set the column width of the second item to zero.
Since you only have two columns, you would use

DoCmd.OpenReport cboType.Column(1)


--
sam


"an" wrote:

smK23,

Thanks for your reply.

I am a little confused because in the RowSouce of query I have:

SELECT DISTINCT Q_MultiField.Type FROM Q_MultiField ORDER BY
Q_MultiField.Type;

an


"smk23" wrote:

One solution: In your RowSource for cboType, have a column with the name of
the report desired. You don't need to display it and can set it's column
width to zero. If it is the 3rd column in your RowSource your code on the
click event of the Cmd button could be:

DoCmd.OpenReport cboType.Column(2)

The column index is zero-based which means that column(2) is the third
column.
HTH
--
sam


"an" wrote:

Hi!

I have one form with 4 sequential combos: CboType, Cbo2, Cbo3 and Cbo4.
In the end of the research, one listbox shows us the result.
In adition, I have 5 Reports, one for each Type, chosen in the CboType.
Each Type has different fields, therefore, different Reports.
It would like:
With one command button in form, in the end of the research,
to open the corresponding Report to the Type chosen in the Cbo1.

Thanks in advance.
an

  #7  
Old February 26th, 2006, 02:47 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Choose Report through command button

Is correct.
I have one form for each Type.

My dificult is write the code on cmd to choose exactlty If IdType1 ("hidden"
in cboType) then R_Type1, IfIdType2 then R_Type2,...

In adition: My CboType has Type and IdType fields with column count=2,
column widths=1cm;0cm and bound column=1

Thanks
an


"smk23" wrote:

I understood from your original post that each selection in cbotype had a
different report:

In adition, I have 5 Reports, one for each Type, chosen in the CboType.


Do you have 5 items in your list for cboType, and are each of those items
associated with a different report? If that is not the case, you will need a
different solution.

In the code for your command button:
You can use a "SELECT Case" statement and specify the parameters required to
select the desired report.
--
sam


"an" wrote:


But I have 4 different reports, because they are differents fields,
consonant the type...
an

"smk23" wrote:

Can you add a column to the table Q_MultiField and put the name of the
report to call there?
Then change the RowSource to "SELECT DISTINCT Q_Mutifield.Type,
Q_Multifield.ReportName FROM ..."

Change the number of columns to 2
set the column width of the second item to zero.
Since you only have two columns, you would use

DoCmd.OpenReport cboType.Column(1)


--
sam


"an" wrote:

smK23,

Thanks for your reply.

I am a little confused because in the RowSouce of query I have:

SELECT DISTINCT Q_MultiField.Type FROM Q_MultiField ORDER BY
Q_MultiField.Type;

an


"smk23" wrote:

One solution: In your RowSource for cboType, have a column with the name of
the report desired. You don't need to display it and can set it's column
width to zero. If it is the 3rd column in your RowSource your code on the
click event of the Cmd button could be:

DoCmd.OpenReport cboType.Column(2)

The column index is zero-based which means that column(2) is the third
column.
HTH
--
sam


"an" wrote:

Hi!

I have one form with 4 sequential combos: CboType, Cbo2, Cbo3 and Cbo4.
In the end of the research, one listbox shows us the result.
In adition, I have 5 Reports, one for each Type, chosen in the CboType.
Each Type has different fields, therefore, different Reports.
It would like:
With one command button in form, in the end of the research,
to open the corresponding Report to the Type chosen in the Cbo1.

Thanks in advance.
an

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
subreport not displaying in main report JohnLute Setting Up & Running Reports 15 November 17th, 2005 04:02 PM
Reporting subreport total on main report BobV Setting Up & Running Reports 22 November 1st, 2005 03:19 AM
Printing Reports Access 2002 Pleas Advise Dermot Database Design 12 October 5th, 2005 11:23 AM
To Sharkbyte and all: Calculate a total values in group level Ally General Discussion 6 June 13th, 2005 08:16 PM
Help!! I'm running around in circles! CathyA New Users 19 December 12th, 2004 07:50 PM


All times are GMT +1. The time now is 01:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.