?
Solved

Copying query causes parameter popup?

Posted on 2012-03-21
7
Medium Priority
?
521 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

 
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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

741 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