By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,395 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,395 IT Pros & Developers. It's quick & easy.

Records *not* in a set

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.