Query not working properly

  • Thread starter Haggr1 via AccessMonster.com
  • Start date
H

Haggr1 via AccessMonster.com

Below is a simple query that returns all records with the same "Job Number"

SELECT Table1.[Job Number], Table1.SetterCompany, Table1.[Date To], Table1.
[Date From], Table1.Amount, Table1.[File Number], Table1.Text, Table1.Code
FROM Table1
WHERE (((Table1.[Job Number])=[Enter Job Number]))
ORDER BY Table1.[File Number];

This query has ran fine for years, until today, when I would enter the
parameter [Enter Job Number] and would click Ok, it would ask for the same
parameter again. After reentering the "Job Number" the query would run as
expected.

First I use "compact and repair", that didn't help, then I used "compile" and
that did't work, so I went to the query in "desing mode" deleted the
parameter, retyped it and all is fine.

Question: What could cause this? Am I on the verge of a total crash. Can I
still trust all of my queries? By the way I am using assecc 2003. Thanks
 
J

John Spencer

This usually means that while the query was open in datasheet view you
sorted it or applied a filter. While the query is open in datasheet view
click on remove filter/sort in the records menu. Then save the query.

If that doesn't fix the problem, recreate the query. Rename the old query
(for recovery purposes)
-- Open the old query in design view
-- Select View: SQL from the menu
-- Copy the SQL statement
-- Open a new query, don't add any tables, switch to SQL view, and paste the
SQL
-- Run the new query. If it gives you the right results save it with the
former name of the old query

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top