Access query randomly starts asking for parmeter twice

Kicker774

New member
Local time
Today, 11:58
Joined
May 4, 2009
Messages
4
So I'm working in Access 2003 (SP3) and I have a simple query that prompts the user for a date then returns the results of items that when out of stock on that specific date.

My query only prompts for 1 date.
This works perfectly the first few times without a problem. But randomly it will prompt for my date field, computate the query, then start prompting for the date field again thus doubling the time the query takes to run.

Only by creating a new query does this problem go away.
If I delete my date field then re-add it, it still prompts for that date field twice.

Is this a bug in Access or my Query (Built straight from the Query designer and not SQL generated or anything like that) ?

Thanks in advance!
 
Hi -

Would you please post your query SQL.

Thanks, Bob
 
Sent request to company IT to give me the update.
Such a pain when you don't have admin rights.

I'll post code up if it starts happening on me again.
Thanks!
 
So I'm working in Access 2003 (SP3) and I have a simple query that prompts the user for a date then returns the results of items that when out of stock on that specific date.

My query only prompts for 1 date.
This works perfectly the first few times without a problem. But randomly it will prompt for my date field, computate the query, then start prompting for the date field again thus doubling the time the query takes to run.

Only by creating a new query does this problem go away.
If I delete my date field then re-add it, it still prompts for that date field twice.

Is this a bug in Access or my Query (Built straight from the Query designer and not SQL generated or anything like that) ?

Thanks in advance!



On my project, it appeared that Access (JET?) was corrupting Queries for unknown reasons, and on an unpredictable basis. Although we have never been able to fully determine the cause of the problem, we did find a quick fix that you are welcome to try. It does not seem to permanantly eliminate the problem, but it does makes the problem go away, and the query returns to normal. On occasion it has had to be used more than one time.
  • Open up the Query that has the problem in SQL Mode.
  • Copy the SQL to Notepad or another text editor.
  • Rename the existing Query.
  • Create a new BLANK Query.
  • Paste the existing SQL (no changes required).
  • Save the New Query with the name of the Existing Query.
Once you have taken these steps, the New version of the Query should work, and you can erase the old (renamed) version.
 
I ran into this problem today. With my application, I found that when I used Access's sort functionality to sort a query that has parameters, it asks for the parameters more than once.

Open the query in sql view, right click the title bar and hit properties. Clearing the "Order By" value fixed the problem for me. Recreating the query would clear this value as well. For my application, I sorted within the query, rather than using Access's built in sorts.

Hopefully that helps

Tyler
 

Users who are viewing this thread

Back
Top Bottom