Queries with User Criteria

AC5FF

Registered User.
Local time
Today, 06:49
Joined
Apr 6, 2004
Messages
552
This one has stumped me for a while. Was wondering if anyone else has seen this issue and may know why it is happening.

I've got several queries where users can input a criteria ... I.E. using [Enter Part Number] or [Enter Vendor] as my criteria. This has always worked and is still working; but now when I'm asked twice for that information.

My main screen has a button to click which just opens the query on a click.

In one database it's happening on one button, but not another that runs a very similar query. Today I noticed it started happening with yet another database's query.

This sound familiar to anyone?
For the most part everyone is using Access 2000; a few computers do run 2010.

Thanks
 
I always use forms to gather user input. Offhand, I'd guess that either in the query you spell the name differently, or in the form/report the query is based on. In other words, if you have [Enter Part Number] in one place and [Enter Part Numbe] in another, you'll get two prompts.

I'd test by just opening the query from the database window and see if you get two prompts. If not, it's probably in the form/report. Also, if you open a report and get a prompt, you'll get it again if you print.
 
I did doublecheck. If I run the query directly than I get the same two prompts that I get when running it from the form.

I understand what you are saying about the two prompts with different spellings/etc but that is not the case here.

The form button just runs the query and there is no prompts set up with the button. It's actually not even opening a report, just the query directly.

Stumped here...
 
Can you post the SQL of the query, and what prompt you get twice? Is there a second query involved?
 
Below is the SQL.
No, there is no 2nd query involved. In this query I look at a vendor table and the user enters [Partial Vendor Name] to search.

Funny thing I just noticed. First, I thought I would shorten this a little and delete a few of the fields the query returns so I copied the query. I first ran that copy and instead of being asked for the criteria twice - this time I was asked THREE times!!!

I then removed about half of the fields the query returns and ran it again. This time I was only asked ONCE.

I went back to my original query (copied here) and was again asked twice. I removed two fields, reran it and was asked ONCE. I didn't save changes when I closed. I reopen and again am asked twice.


Code:
SELECT [VENDOR TABLE].Company, [VENDOR TABLE].[Vendor #], [VENDOR TABLE].Date_1099, [VENDOR TABLE].[Date_1099 req indicator], [VENDOR TABLE].Company, [VENDOR TABLE].Address_1, [VENDOR TABLE].Address_2, [VENDOR TABLE].[City, State, Zip], [VENDOR TABLE].City, [VENDOR TABLE].State, [VENDOR TABLE].Zip, [VENDOR TABLE].Phone_1, [VENDOR TABLE].Phone_2, [VENDOR TABLE].Fax, [VENDOR TABLE].[Company E-mail], [VENDOR TABLE].Contact_1, [VENDOR TABLE].[Contact_1_E-mail], [VENDOR TABLE].Contact_2, [VENDOR TABLE].[Contact_2_E-mail], [VENDOR TABLE].Remarks
FROM [VENDOR TABLE]
GROUP BY [VENDOR TABLE].Company, [VENDOR TABLE].[Vendor #], [VENDOR TABLE].Date_1099, [VENDOR TABLE].[Date_1099 req indicator], [VENDOR TABLE].Company, [VENDOR TABLE].Address_1, [VENDOR TABLE].Address_2, [VENDOR TABLE].[City, State, Zip], [VENDOR TABLE].City, [VENDOR TABLE].State, [VENDOR TABLE].Zip, [VENDOR TABLE].Phone_1, [VENDOR TABLE].Phone_2, [VENDOR TABLE].Fax, [VENDOR TABLE].[Company E-mail], [VENDOR TABLE].Contact_1, [VENDOR TABLE].[Contact_1_E-mail], [VENDOR TABLE].Contact_2, [VENDOR TABLE].[Contact_2_E-mail], [VENDOR TABLE].Remarks
HAVING ((([VENDOR TABLE].Company) Like "*" & [Partial Vendor Name] & "*"));
 

Users who are viewing this thread

Back
Top Bottom