Print Report from Form's ComboBox with Macro Where Condition

irsmalik

Registered User.
Local time
Today, 20:51
Joined
Jan 28, 2015
Messages
88
I am using Option Group on a Form for a series of Reports Preview…. One of the Option is a:
ComboBox on Form with 3 CompanyNames (Greenlet, Suncrop, Sungro)...
I want to run a Macro for Preview of Reports….
If comboBox select Greenlet Only Greenlet Report Print preview
If comboBox select Suncrop Only Suncrop Report Print preview
If comboBox select Sungro Only Sungro Report Print preview

I need help how to create Macro with Condition of Specific Company name printing
I tried it in Macro Where Condition:
[CompanyName] = Forms![Dealers Report]![cboMyCompany]
But No Result….

Thanks
Irsmalik
 

Attachments

i add code to the 2nd Option button (Select company in chart).
select a company and click on Chart button.
see the code on the form.
 

Attachments

Dear Mr arnelgp

Sir.... Thanks so much.... this is what I want.....​

Really thankful to you for helping.....​

irsmalik

 
Dear arnelgp
I want to print Latest OrderDate on Report. I made a query qLastDate.... and got 23-May-22... was last date of entry.
Now I made a Text Field and use =[qLastDate]![LastDate] at ControlSource of Report.
but it is giving Error.....

Plz guide how to print this Last Date on my report.
 
This Last Date will be printed on various Reports in Header ....
 
can you use DLookup() function:
use this As ControlSource:

=DLookup("LastDate", "qLastDate")
 
Dear Sir arnelgp
Sorry to disturb again.
My Chart's data consist on Only One Page but is is printing more than One page.... On all the pages, Data / Bars and their figures are Same... How can I restrict printing Only One Page... ?

Thanks in advance Sir.... I hope you won't mind... I am a learner... and want to learn from you.
irsmalik
 

Attachments

dont add RecordSource to the report.
 

Attachments

Sir.... Thank So Much..........
You Are Great........& very kind to me....
irsmalik
 
Sir... Arnelgp...
Do we need to change in Report properties.... ? to get only one print ...?
irsmalik
 
open the report in design view.
on the Property->Data->Record Source = Blank (i already remove it).
 
Dear Sir arnelgp
There is some problem in Chart view.... When select Company Combo from Dealers Report.. & run Chart Button.. A Dialog box appear for " Enter Parameter Value", "Company Name"
if I cancel it.... then Chart shows its Data.... Only One Page.... Any Solution Plz.
1655789970917.png




Thanks
irsmalik
 
Further, there is SubReport containing Grand Total of That Company, or Region, or Territory, or Dealers Total Business. This is Master Link and Child Link with RecordSource....
If we Delete RecordSource, there is No Link and SubReport does not work.
irsmalik
 
Dear Sir @arnelgp

Sir... please your attention require for above mentioned problem.

irsmalik
 
i don't think you need subform for it. see the attached on post#9 or yet post your db
so i will understand better what you mean.
 
Sir arnelgp
Mostly I have complete as per your instruction.... But this portion is not clear to me
I select Company Name and then Select its Region Name..... Chart and its Data is correct and OK... Even its Grand Total at Report Footer is OK....
In Report Header I want to Show the Region Name... but it is not showing.... Only Region ID is showing....
Here is attachment for you....
Thanks
irsmalik
 

Attachments

sir arnelgp

Please accept my thanks..... apparently these small tricks but I am un-aware of it....
Thank so much sir....
irsmalik
 

sir @arnelgp

If Report has No Data, there is a NoData Message....
If Chart Report has No Data..... this NoData Message Does Not Work....
Is there any way to Display NoData Message in Chart Report.....
Thanks
irsmalik
 

Users who are viewing this thread

Back
Top Bottom