?
Solved

form to filter for the criteria, then open the report based on that criteria.

Posted on 2011-09-11
10
Medium Priority
?
273 Views
Last Modified: 2012-05-12
Afternoon,

I have a form and report in Access 2010.  I want to filter the report from a combo box on the form with the submit button is pressed ("onClick").  Im able to open the report with the button but im having a lil difficulty filtering the report based on the drop down selection of the form.  I've researched and see i have to place the filter on the data the report is pulling from but not sure how to exactly do that, any ideas???
0
Comment
Question by:IT_newbie01
  • 5
  • 4
10 Comments
 
LVL 40

Expert Comment

by:als315
ID: 36520969
We need more details.
May be you can upload sample from your DB?
You can also try to filter data in report source query. When it will work, you can use same "where" in filter.
0
 
LVL 9

Accepted Solution

by:
Armen Stein - Microsoft Access MVP since 2006 earned 1600 total points
ID: 36523710
One way to have a report prompt the user for criteria before it runs is to open a form from the report's Open event.  Open the form in Dialog mode so that the report waits for the form to be closed or hidden before it proceeds.  That way you can collect criteria from the user and build a Where clause for the report.  It also means that you can call the report directly - you don't need to call it from a form.  And the selection form is reusable - it can be called from multiple reports if they need the same criteria.

I've posted examples of this technique on our free J Street Downloads page at http://www.JStreetTech.com/downloads.
See "Report Selection Techniques".

Cheers,
Armen
0
 

Author Comment

by:IT_newbie01
ID: 36536330
ArmenStein,

That is exactly what im looking to accomplish.  I wish i'd seen this post alot sooner.  Im having to rearrang alot of my design because it is not web compatible .  Can you confirm that this setup is web compatible??
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9
ID: 36538036
Hi IT_newbie01,

This technique will not work in Access web applications.  For one thing, it uses VBA extensively, which isn't supported for web apps.  So although a technique *like* this might work, it would need to be rewritten using web-safe forms and macros.

Armen
0
 

Author Comment

by:IT_newbie01
ID: 36538280
Armen,

I’m sorry to hear that!! But you did provide an answer for the question posted so I will award you the point in a few minutes.  Would you happen to know where I might find documentation of the equivalent that’s web accessible?  Also do you know why VBA is no supported on the web and what techniques are supported when posting to the web?  This would help me know if certain techniques are web-friendly moving forward.

Thanks!!
0
 

Author Closing Comment

by:IT_newbie01
ID: 36538287
I wish this technique was supportted for posting to the web.
0
 
LVL 9
ID: 36538436
Me too!  As developers (including us) get more experience working with web apps, new techniques will emerge.  I don't know of documentation of an equivalent for web apps.  I do know that many of our clients are interested in using Office 365 for hosting, and it doesn't support web reporting *at all* yet.  So we are really in a pioneering stage of development here.  Hopefully many of these issues will be resolved soon, at least by the next release of Office.

As I understand it, VBA isn't supported in web apps because having the power and flexibility of VBA turned loose on the server was deemed too dangerous and hard to control.  And that makes some sense - you don't want a rogue chunk of VBA taking down a whole server.  That isn't likely with the more carefully controlled macros.  There are many other limitations of web apps for similar reasons.  That's why although very interesting, Access web apps are not a solution to every problem.

Armen
0
 

Author Comment

by:IT_newbie01
ID: 36538553
"Office 365 for hosting, and it doesn't support web reporting"

That means even if I find an equivalent (in Access 2010) it won’t be supported on the web??  Can you define "web reporting"?  So there’s no way to filter a report via the web with Access 2010?
0
 
LVL 9
ID: 36538815
What I mean is that as far as I know (and I can't see that it has changed yet), Office 365 does not support Access reports running in the browser.  They are supported if you have your own SharePoint 2010 Enterprise environment.  I believe AccessHosting supports them too.  And they are supported running in an Access client app connected to SharePoint.

See this rather frustrated thread:
http://community.office365.com/en-us/f/170/t/4280.aspx

It's another reason that Access web apps just don't fit every scenario.  At least not yet - things are still changing.

Armen
0
 

Author Comment

by:IT_newbie01
ID: 36538948

Ok, that's what my research had turned up.  My client has SharePoint so I’m in charge of migrating report supporting into SharePoint w/ Access for the web.  Fun times!!!  I will post another question for reference/ sample on this reporting in Access support on the web.

Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question