473,396 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
1 1141
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
3
by: CSDunn | last post by:
Hello, I have an Access 2000 Project in which the data comes from a SQL Server 2000 database, and multiple users need to be able to see new records as each user adds records. The users also need...
1
by: Liz | last post by:
I have a table of about 10,000 records where each record has a numeric field named RecIdent. The value of RecIdent starts at 1 and is not sequential. For a given RecIdent, there may be only one...
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
6
by: Paul T. Rong | last post by:
Dear all, Here is my problem: There is a table "products" in my access database, since some of the products are out of date and stopped manufacture, I would like to delete those PRODUCTS from...
5
by: Grant | last post by:
Hi Is there a way to recover deleted records from a table. A mass deletion has occurred and Access has been closed since it happened Louis
6
by: Damon Grieves | last post by:
Hi I just want to be sure I understand how the Access client works. If I have an Access back end with a million records on a server and an Access client. If the client is installed on the users pc...
13
by: Jan | last post by:
Hi I have a database that I use to keep track of the sales promotions that we send to companies. I normally send a mailing based on a subset of the companies in the database (found using the...
1
by: KC | last post by:
Hello, I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB. I have tweaked this DB to work for our small co. It has worked pretty well up until I made the mistake of deleting...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.