Help! Query made records disappear

T

Trish T

I'm using Access 2000 to keep a database of proposals my firm has submitted.
It has over 3,800 records. I ran a query in query design view to find
proposals on which we were a subconsultant to another firm; the resulting
query had 497 records. I never ran a Make Table query or anything like that
and it never asked if I was sure I wanted to delete any records, but now my
main table only has those 497 records! The file size of the database doesn't
seem to have changed, though. Could the records be hidden somehow?
 
J

John Spencer

File size won't change when records are deleted. The size will only
change after you compact the database. There is too much overhead with
cleaning out "dead" space in the file every time a record is deleted or
changed.

As a test, try switching to the VBA window and in the immediate pane
type the following and press return
?DCount("*","NameOfYourTable")

If that returns 497 then your records are gone (find the backup). If it
returns 3800 or greater then something is hiding your records.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
T

Trish T

Ugh! Only 497 records! I still don't understand how it happened. I ran the
select query, then I deleted the records I didn't want from the query. How
they were deleted from the table, I can't figure out. Fortunately, my
company runs nightly backups. Thanks for your help.
 
J

Jeff Boyce

Trish

I don't recall you mentioning before that you "deleted the records you
didn't want from the query".

For future reference, a "query" is just a window on the table. If you look
at 3000 records returned by a query, then delete ones "you don't want", THEY
ARE DELETED FROM THE TABLE!

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Trish T said:
Ugh! Only 497 records! I still don't understand how it happened. I ran
the
select query, then I deleted the records I didn't want from the query.
How
they were deleted from the table, I can't figure out. Fortunately, my
company runs nightly backups. Thanks for your help.
 

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

Similar Threads


Top