Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 April 30th, 2005, 08:39 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks u all for the care,
Problem was solved. I have had a SQL string that changes accordingly to the
input on the form, and which makes a qry that is used as recordsource for the
report. The bug was that the SQL string was making a parameter qry that
asked for the inputs already supplied by the criteria form. When i had
the SQL corrected by deleting the Parameter statement the process has been
running accordingly with what it should. The mmcdonal first suggestion have
made me pay attention to duplicate inputs to the report recordsource.
Rgds P.

 
Old April 30th, 2005, 11:48 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

In case there is any question as to the term "criteria prompts," a better word would be parameters.:)

When you add paramters to a query, like this:

SELECT [tblTableName].ID, [tblTablename].FirstName, [tblTableName].LastName
FROM [tblTablename]
WHERE ((([tblTablename].LastName) Like [Enter the first letters of the last name:] & "*"));

No matter where you run the query from (directly, or from a form or report) the query will always prompt the user for input.

If the query refers specifically to a form field, as well, then unless that form is used to open the query, it will prompt for input.

When I create queries, as a rule, I do not put any parameters in the query. That way I can use the query from any form or report etc, without fear of prompting by the query.

I have a visual organization chart database, for example, that has about a dozen forms, and about 180 buttons, and each form and button calls the same report, with just one query. If I had put parameters in the query, it would prompt on some occassions when it was called from the report (from the button, and from the form).

I hard coded each button to call the one report with a few parameters supplied on each button. I have one button that supplies no parameters, so the entire organization shows up in the report.

Anyway, sorry for the confusion.


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Array as recordsource for Report prasanta2expert Access VBA 1 March 14th, 2008 04:21 PM
Access Subform RecordSource Issue llaurit Access 3 March 12th, 2008 01:04 PM
Recordsource Scripts82 Access VBA 4 March 7th, 2006 03:04 AM
How to change report's objects dynamically. Vadim Crystal Reports 2 May 17th, 2004 09:40 AM
Report's record source too long Mitch Access 7 January 26th, 2004 04:17 PM





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