467,921 Members | 1,328 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,921 developers. It's quick & easy.

Records *not* in a set

Is there a way to make a query that shows records that do not appear in
a recordset?

I'm concerned with two tables: tblQuestions and tblTemplateQuestions.
tblTemplateQuestions is a merge table between tblQuestions and
tblTemplates. Each template has many questions, and each question can
belong to multiple templates.

I want to make an interface of checkboxes for selecting records. For
each Template record on a form, I want a subform that is a list of all
the questions from tblQuestions, but has checked checkboxes for those
with an entry in the tblTemplateQuestions table for that Template. The
user would then check or uncheck records, which would create or destroy
records in the merge table programmatically.

I can get the recordset of Questions belonging to a particular query
easily enough, but the trick is getting the Questions that are not in
the merge table for a *particular* template. If I could get that
recordset, I could put the two together in a merge query, and I'd be set!

I've done looking, and I didn't find any SQL keywords in the help, or on
the web.

TIA!

Steve Lefevre
Nov 13 '05 #1
  • viewed: 1018
Share:
1 Reply
On Wed, 02 Jun 2004 03:29:00 GMT, STeve Lefevre <le********@osu.edu>
wrote:

Use syntax like:
select * frm SomeTable where SomeField not in (1, 5, 10)
or
select * frm SomeTable where SomeField not in (select SomeOtherField
from SomeOtherTable where <somewhereclause>)

-Tom.

Is there a way to make a query that shows records that do not appear in
a recordset?

I'm concerned with two tables: tblQuestions and tblTemplateQuestions.
tblTemplateQuestions is a merge table between tblQuestions and
tblTemplates. Each template has many questions, and each question can
belong to multiple templates.

I want to make an interface of checkboxes for selecting records. For
each Template record on a form, I want a subform that is a list of all
the questions from tblQuestions, but has checked checkboxes for those
with an entry in the tblTemplateQuestions table for that Template. The
user would then check or uncheck records, which would create or destroy
records in the merge table programmatically.

I can get the recordset of Questions belonging to a particular query
easily enough, but the trick is getting the Questions that are not in
the merge table for a *particular* template. If I could get that
recordset, I could put the two together in a merge query, and I'd be set!

I've done looking, and I didn't find any SQL keywords in the help, or on
the web.

TIA!

Steve Lefevre


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by CSDunn | last post: by
5 posts views Thread by Grant | last post: by
6 posts views Thread by Damon Grieves | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.