Solved

Copying query causes parameter popup?

Posted on 2012-03-21
7
502 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

911 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

19 Experts available now in Live!

Get 1:1 Help Now