Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2003, 08:58 PM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default passing input to a query

Is it possible to accept a date input from a user for a report upon execution, pass the value to a query, have the query execute and generate a report using the query result? Hope that makes sense.

I have a working query to generate output, but I haven't been able to think of a way change the date parameter without going into the design view and create a formatted view for the output.

Thanks in advance.
 
Old October 23rd, 2003, 03:42 AM
Registered User
 
Join Date: Oct 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to krswhy
Default

How about using the Parameter in the Report Design View?

Herru
 
Old October 23rd, 2003, 06:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Well, this is sort of strange. A report is a passive entity. It gives back to you information that you collected in a table. The information you got in the table was generated by a query or entered. The way the user gets to all of that is via a form.

You don't enter data into a report. A report is one way: out (to the screen or printer). Therefore, the place to ask for the date and execute the query is at the form. Enter the date at the form, then the form runs the query which accesses the table. When it's done, the form then opens the report with the correct recordsource.

Entering the date in a form should be very easy. Then the user can either click or button you can put an AfterUpdate event on the date field.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old October 23rd, 2003, 08:43 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use a parameter query to prompt the user for a date value. Use the query for the report.
If you do not know how to do that, Paste your SQL from your query and I will show you.


Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing input Dates in a Crystal Report from ASP P preethig Classic ASP Basics 4 March 5th, 2008 08:50 AM
Passing Input Date Parameter values preethig Crystal Reports 0 February 28th, 2008 08:39 AM
Oracle connection-passing input to query!! thottufj Pro Visual Basic 2005 1 October 18th, 2007 03:21 PM
Passing an Input Field to a Parameter Query stcraig BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 November 6th, 2006 06:06 PM
problems with passing user input to a query boozin Classic ASP Databases 3 March 10th, 2004 05:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.