Query Records Missing

M

mmm_danone

Bit of background first....

I have a database I'm building for a construction company. They have a
large archive area where boxes of files on each project are stored.
They want a new archive numbering scheme, and intend to have each box
re-labeled. From the data they have given me, I've created 2 tables -
1 to store the project details, and 1 to store the archive details.
Nothing too complicated here.

Table1 (Project Details)
Job ID (linked as 1-to-many to table 2)
Address
Postcode
etc.

Table2 (Archive Details)
New Archive Box Number (autonumber)
Job ID (linked as above)
Archive Location
etc.

I'm wanting to set up a report which allows me to print a label for
each Archive Box, using certain fields from tables 1 and 2. Using a
Sub-report to return the data looks ugly to me (as it's shown in
tabular format).

So I set up a make-table query to allow this to happen, but for some
reason 150 "random" records were missing (out of 4000) when I ran the
query. I tried a Select Query too - which is probably more suitable -
with the same results (and exactly the same records missing). I look
at the records which fail, and they are as far as I can see identical
in format to all the others.

The label-report based on either type of query looks great, but
obviously with some records missing. If anyone has any ideas how I can
debug this query, or another way of getting what i want, I'd be very
grateful.

TIA

Jon
 
M

mmm_danone

I've worked it out - was unable to establish referential integrity on
the relationship between tables 1 and 2 (Job ID), and sure enough the
missing records had slightly different Job ID's.
I'm a happy man now.

Jon
 

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