Solved

Copying query causes parameter popup?

Posted on 2012-03-21
7
501 Views
Last Modified: 2012-07-18
Access 2007 or 2010 whenever I copy a query it causes a parameter query to popup.... what is causing this or how do I correct this?
0
Comment
Question by:geekmee2
  • 3
  • 2
  • 2
7 Comments
 
LVL 26

Expert Comment

by:Nick67
ID: 37749310
There is not a lot of detail in your question, but the parameter popup occurs when your query contains non-existent fields or variables, or if they have syntax errors in them.  The query engine asks YOU to supply these values, since it cannot locate them on it's own.

What do you mean by <<whenever I copy a query >>?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37749562
<whenever I copy a query >
*Any* query, or only one query in particular?

This happened to me a few times, I simply deleted the query and recreated it...
0
 

Author Comment

by:geekmee2
ID: 37752456
Any query I copy 90% of the time... It does not happen every single time, but the majority of the time, I can count on it happening.

Here is the SQL View contents of the current query I copied that asks for a paramater value:
============================================
SELECT BGInfoTable.User_Name AS UserName, BGInfoTable.Host_Name AS MachineName, BGInfoTable.ArmWDC, BGInfoTable.ahlta AS AHLTA
FROM BGInfoTable
WHERE (((BGInfoTable.ArmWDC) Not Like "2*") AND ((BGInfoTable.ahlta) Like "3.3.6*"))
ORDER BY BGInfoTable.User_Name;
=============================================
Here is the popup:

Enter Parameter Value
"ArmWDC - Delta.AHLTA"

The name of the query copied:
"ArmWDC - Delta"

The copied query renamed giving the popup:
"ArmWDC - Installed"
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37752754
No, I meant I *deleted* the query, then * recreated it *from scratch*.

If you simply copy it and rename it, the same issue follows.

Try simply creating a new blank database and importing all the objects...
0
 
LVL 26

Expert Comment

by:Nick67
ID: 37753236
<<What do you mean by <<whenever I copy a query >>?>>

You still haven't quite said.
Are you copying and pasting an object in the database window / nav pain?
Are you copying the SQL you posted, creating a new query in design view and then pasting the SQL in?
Or, are you do something else altogether.
Moreover, when does this popup occur?
When you open the query?
When you open a form?
On some VBA event?
0
 

Accepted Solution

by:
geekmee2 earned 0 total points
ID: 37764068
I have discovered the source of my parameter query popup... When query objects are copied and pasted in the Navigation Pane.

You have to deactivate any temporary column sorts created in Datasheet View... before copying the query object.

If you copy a query object in the Navigation Pane, and one of the columns has a column sort created in datasheet view, it will create a parameter query popup for any field with a temporary or adhoc column sort.

I had a temporary column sort created in Datasheet View on the column "AHLTA"... henceforth the parameter query displayed:

Enter Parameter Value: "ArmWDC - Delta.AHLTA"

Query column sorts activated in Design View... are not a problem when the query object is copied.

SOLUTION:
I need to clear all temporary column sorts in Datasheet View before I copy a query object in the Navigation Pane... to avoid creating a parameter query out of the copied query.

It would be nice if Microsoft would clear any temporary sorts in Datasheet View when query objects are copied...since Datasheet View column sorts are temporary.

(I apologize for my vague 'copy query' description, ... I entered my question in a fit of frustration.  I have been stumped over the source of this...intermittent... unwanted parameter query for a long time.)

Thanks, your questions helped me clarify my thinking and isolate the source of the problem.
0
 

Author Closing Comment

by:geekmee2
ID: 37786187
I now can re-create the problem on demand and discovered the operation that creates the issue. I Googled the issue and found many other resolved inquires on the same issue. Microsoft does not address this "problem" or see it as an issue to be addressed in any of their support files... that I found.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

743 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