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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query showing "No current record"

Status
Not open for further replies.

XB9R

Programmer
Dec 4, 2006
20
BE
Hi all,

I have a db with a simple query: main table & detail table linked through 1 IDkey - display all records from main table and only the related records from detail table. Output is grouped: IDkey from main table and a Yes/No checkbox from the detail table. The detail table is empty (no records). Query displays only the headings - no records. This is exactly what I want. So far so good. Now I copy the db and hand it over to a friend. The db performed fine until yesterday: suddenly the query won't run any longer, but is displaying the error message "No current record". Thinking that this was a "machine problem" I copied the db on my PC. Now I have 2 identical db's: one will run the query (showing only the header row - no records) - the other one won't run the query (showing a "no current record" error). I can't find any difference between the 2 db's. Any ideas ?

Dave
 
How are ya XB9R . . .

On face value (according to your post origination) ... I can't help but agree with [blue]dhookom[/blue]. So to put a little more filling in the pie ...
[ol][li]Same OS?[/li]
[li]Same Access Version?[/li]
[li]Are you running the query from the [blue]query pane[/blue] or is it [blue]SQL in VBA?[/blue][/li]
[li]Query or SQL ... is the [blue]SQL the same?[/blue][/li][/ol]
Just a few thoughts that crossed my mind.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks for your responses.

Some more background:
As I told 2 db's, db2 being a copy of db1. db2 transferred to different PC. db2 worked fine until a day ago. Copied db2 back to my PC. the "No current record" stays. So same OS (XP pro), same Access 2003,...

I traced the error down to SQL in a subform. Copied the SQL into a query, both in db1 and db2 using the SQL from the "good" db1. I still got the error in db2.

Start stripping the query down, field by field. That's how I figured out that the Yes/No check field from the detail table is causing the issue.

I created a new query, with the same result. Can't find any difference in the table definitions.

Next I copied db1 to db3, deleted all tables, queries,forms,... & imported them again from db2. db3 also says "No current record".

So to answer all your questions above:
- Re-creation of query doesn't fix the problem
- SQL is definitly the same as I used the SQL from db1 to re-create in db2
- Corruption: Think I covered that by (re-)creating db3

As db2 has been on a different PC(s):
Pretty sure they have also XP pro, don't know about Access version (at least 2003, possibly opened with 2007 and/or 2010)

Very much appreciate your inputs.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top