Query problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is supposed to leave me with numbers 1 to 12 that have not been used
i.e. if 3 has been used the combo box should only show 1,2,4,5 etc

Pairs is a tbl with numbers 1 to 12

TestRecord is a tbl with 12 empty records

SELECT Pairs.Pairs, TestRecord.TestRecord
FROM Pairs LEFT JOIN TestRecord ON Pairs.Pairs = TestRecord.TestRecord
WHERE (((TestRecord.TestRecord) Is Null));

Hope that made sense
 
Can you give an example of what's in Pairs and TestRecord? The idea of "a
tbl with 12 empty records" doesn't really make sense to me.
 
if you look further down to the post titled Help this might give you some
idea of what i am trying to do.
 
Answering my question about what do the two tables look like would go much
further to explaing what you're trying to do!
 
Ok
Pairs Table

PairsID Pairs
1 1
2 2
3 3
.. .
.. .
12 12

TestRecord Table
TestRecordID TestRecord
1 (Empty Field)
2 ""
3 ""
.. ""
.. ""
12 ""
 
Do you set the value of TestRecord somehow so that sometimes it's not empty?
(I'm assuming it's actually Null, not a zero-length string as you've
indicated). If not, then your query will always return the same thing.
 

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

Find suspected duplicates 2
Query Null 1
query too slow 1
Ranking Query Results 4
getting duped records from a table 1
Calculation in Update query drops decimal places 2
join 4
Issues with Left Join 1

Back
Top