Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Corrupted? Query Seems to be looking for something not there? 1

Status
Not open for further replies.

kjv1611

New member
Joined
Jul 9, 2003
Messages
10,758
Location
US
I've got a query in an Access database which was created in Access 2003, but I'm now using Access 2007 - may or may not be related to the issue.

Anyhow, it seemed the query was not really pulling what I want it to pull, but at least it didn't have any weird errors.

After I did a compact and repair on the database, the query now is doing something rather strange. This is leading me to wonder if it could be data corruption.

Here's the SQL code for the query:
Code:
SELECT tblImport.ImportUniqueID, tblImport.[Office], tblImport.Date, tblImport.[Case Number], tblImport.[Last Name], tblImport.MI, tblImport.[First Name], tblImport.County, tblImport.State, tblImport.[Extra #1], tblImport.[Extra #2], tblImport.Other, tblImport.[House #], tblImport.[Street Name], tblImport.City, tblImport.Zip, tblImport.[SS#], tblImport.Phone, tblHist_Data.ImportUniqueID
FROM tblImport LEFT JOIN tblHist_Data ON tblImport.ImportUniqueID = tblHist_Data.ImportUniqueID
WHERE (((tblHist_Data.ImportUniqueID) Is Null));

That is exactly the code in the SQL view for the query, other than my changing of a couple of field names. So why in the world would the query give me this message when opened in data sheet view:
Enter Parameter Value
Query5.Date
_____________

It's just an input box asking for the Query5.Date value. But I'm querying against 2 tables, ONLY, and no other query is involved. Also, the query name is NOT Query5. The Query name is "qryUpdate_tblHistData"

Any thoughts on this odd-ball one?

--

"If to err is human, then I must be some kind of human!" -Me
 
In SQL view copy all the code to the clipboard, close the query, delete it, recreate it, paste the code in SQL view.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
THANKS PHV!

That fixed it!

I suppose I shoulda thought to try it, but now I hopefully will remember it the next time, if there is one. [wink]

--

"If to err is human, then I must be some kind of human!" -Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top