Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2005

Tip: Looking for answers? Try searching our database.

Running Specific Reports

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony - 11 Oct 2005 19:41 GMT
I am trying to find out if I can press a button in a form and have a input
box pop-up where I can enter in a name ie. company name and run a report on
that company.  Does anyone have code or even know if this is possible or does
the users just have to create a query everytime?  Thanks in advance.
Ofer - 11 Oct 2005 20:38 GMT
Use the Where condition in the OpenReport Command line, to pass the criteria
to filter on the company name
========================================
The code for the button click event

Dim MyWhereCondition as String
MyWhereCondition = "[Company Name Field name in the table] = '" &
Me.[Company Name Field in the form] & "'"
Docmd.OpenReport "ReportName",,, MyWhereCondition
=========================================
The single quote is for string filter

If you filter on a number it will be
MyWhereCondition = "[Company Name Field name in the table] = " & Me.[Company
Name Field in the form]

Signature

I hope that helped
Good luck

> I am trying to find out if I can press a button in a form and have a input
> box pop-up where I can enter in a name ie. company name and run a report on
> that company.  Does anyone have code or even know if this is possible or does
> the users just have to create a query everytime?  Thanks in advance.
Karamursel - 11 Oct 2005 22:26 GMT
Try this
Select company
from company
Where company = [:conpany name];

The colon  :   is what makes it work. This is the function for a parameter
Have a good day
Karamursel

> I am trying to find out if I can press a button in a form and have a input
> box pop-up where I can enter in a name ie. company name and run a report on
> that company.  Does anyone have code or even know if this is possible or does
> the users just have to create a query everytime?  Thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.