Solved

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

Posted on 2011-09-11
10
259 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 39

Expert Comment

by:als315
Comment Utility
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 400 total points
Comment Utility
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
Comment Utility
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
 
LVL 9

Expert Comment

by:Armen Stein - Microsoft Access MVP since 2006
Comment Utility
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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Closing Comment

by:IT_newbie01
Comment Utility
I wish this technique was supportted for posting to the web.
0
 
LVL 9

Expert Comment

by:Armen Stein - Microsoft Access MVP since 2006
Comment Utility
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
Comment Utility
"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

Expert Comment

by:Armen Stein - Microsoft Access MVP since 2006
Comment Utility
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
Comment Utility

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now