-
WSMarkLiquorman
AskWoody LoungerI don’t really understand what you are asking. You might want to include the SQL for your query and give an example of what it is (or is not) doing.
-
WSMarkLiquorman
AskWoody LoungerIf you don’t have one, you need a separate table that just contains all the codes. You need to create a new query that uses a Left Join to connect this table to your previous query, something like this:
SELECT … FROM [codetable] LEFT JOIN [old query] ON [codetable].code = [old query].code WHERE [codetable].code IN (…)
-
WSMarkLiquorman
AskWoody LoungerI don’t know about anyone else, but when you present a convoluted situation like this (one query is a source for another query which in return is a source for yet another query), it would help me if you could explain the logic behind all the queries. That is, what does each query do and what are you expecting out of it.
-
WSMarkLiquorman
AskWoody LoungerI didn’t think you could use dbOpenTable and .Seek on a linked table? Try using dbOpenDynaset and .FindFirst instead.
-
WSMarkLiquorman
AskWoody LoungerPerfect normalization is seldom achievable. My favorite saying (from a fellow I knew from another forum and who is an Access MVP) is to “normalize until hurts, then denormalize”).
In your situation, perhaps it is not necessary that any name be associated with a membership in the main membership record? It is just a Membership#, start date, maybe a billing address, etc. Then a child table contains any individuals (along with email addresses, maybe phone#, etc. One immediate question you need to ask yourself is “can there be more than 2 individuals on a membership?” What if a child can be listed?
I’m not saying what you’ve done is necessarily wrong. It would be wrong if you didn’t consider alternatives. If you did consider alternatives and concluded that this design worked best given all factors, then that’s OK.
-
WSMarkLiquorman
AskWoody LoungerYou need a master table of locations, but you don’t need a “Used” field. Not only don’t you need it, it is a BAD idea; you are dependent on this field being updated properly.
You just need a query that basically looks like this:
SELECT locations.locationID FROM locations LEFT JOIN boxes ON locations.locationID=boxes.locationsID WHERE boxes.LocationID Is Null
Of course, I’m guessing at your table names, but the gist of this query is to return every record from your locations table that does NOT have a record in your boxes table.
-
WSMarkLiquorman
AskWoody LoungerYou need to read-up on database normalization. Your table design would seem to violate one of the basic principles, which results in your having to go through all sorts of manipulates to get what should be a simple result.
That said, this should work:
SELECT name1, email1 FROM yourtablename WHERE name1 is not null
UNION SELECT name2, email2 FROM yourtablename WHERE name2 is not null
ORDER BY name1 -
WSMarkLiquorman
AskWoody LoungerBut how do you know what is missing? To know something is missing, you must have some idea of what is available. Do you have a master table of locations? If you do, then this is simple, it is just a query using an Outer Join.
If you don’t have such a master table, how could you possibly determine what is missing? In the example you have above, how do you “know” that A1-10 is missing? Is it possible you don’t have an A1-10? Or is there automatically a 01-99 for each prefix? If so, do you have a master list of such prefixes? This would also make things easier.
But if you don’t even have that, then it gets messy. To start, don’t even think queries for a second, how would you look at your list of records and determine a location is missing? You might start like this:
– Sort the records by location.
– Start at the first record, and assuming it is A1-01, you’d expect the next number to be A1-02. If it is, you are OK; if not, you’ve detected a missing number. But how many? -
WSMarkLiquorman
AskWoody LoungerFirst all all, does the table you are looking at use “location” as the PrimaryKey? Or are you looking at a table that has a “location” field, but can have multiple records with the same location and you are trying to find which locations have no matching records in this table?
-
WSMarkLiquorman
AskWoody LoungerIs the field in question defined as a numeric field?
-
WSMarkLiquorman
AskWoody LoungerDecember 9, 2015 at 3:41 pm in reply to: validation rule to check the number of digits enters #1541166If you want to accept no more than 5 digits, you can use an input mask of “99999”. For exactly 5 digits, use “00000”.
-
WSMarkLiquorman
AskWoody LoungerPut an unbound combobox at the top of your form, with the rowsource being your table. If user enters something “Not In List”, you can pop a msgbox.
-
WSMarkLiquorman
AskWoody LoungerIf you do data entry into those other table via subforms on the form to which you entered your _Job record, you then set the Linking field properties: the Master property as ID and the Child property as JobID.
-
WSMarkLiquorman
AskWoody LoungerYes, you can do that. The subform containing the info from tblShipHandle will be a continuous-form or a datasheet, so you can see everyone associated with that ship. When you set the master/child linking fields in the subform properties, this limits the contents of the subform to only those handles associated with that ship.
-
WSMarkLiquorman
AskWoody Lounger>>I haven’t done it yet, but I can put fields in tblShips to hold the Handle of each person associated with the ship.<<
NO! This is the absolute WRONG way to do it! You need to create another table, call it tblShipHandle or something like that. It can have as few as 3 fields: ID (from the Ship), the Handle, and the position. The information would be presented on frmShip as a subform (the parent and child fields are the ID field). Use a combobox to select the person, and a textbox to enter the position (Don't show the ID field).
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
TotalAV safety warning popup (Awaiting moderation)
by
Theodore Nicholson
13 minutes ago -
two pages side by side land scape
by
marc
17 hours, 56 minutes ago -
Deleting obsolete OneNote notebooks
by
afillat
20 hours, 2 minutes ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
20 hours, 12 minutes ago -
Security Essentials or Defender?
by
MalcolmP
1 hour, 37 minutes ago -
April 2025 updates out
by
Susan Bradley
23 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
8 hours, 22 minutes ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
2 hours, 6 minutes ago -
Creating an Index in Word 365
by
CWBillow
11 hours, 35 minutes ago -
Coming at Word 365 and Table of Contents
by
CWBillow
3 hours, 3 minutes ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
1 day, 14 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
1 day, 18 hours ago -
W11 24H2 – Susan Bradley
by
G Pickerell
1 day, 20 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
1 day, 18 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
1 day, 11 hours ago -
I installed Windows 11 24H2
by
Will Fastie
3 hours, 13 minutes ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
1 day, 23 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
2 hours, 36 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
2 days, 8 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
1 day, 16 hours ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
1 day, 16 hours ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
3 days, 1 hour ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
3 days, 9 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
2 days, 11 hours ago -
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
2 days, 18 hours ago -
Is data that is in OneDrive also taking up space on my computer?
by
WShollis1818
3 days, 4 hours ago -
Nvidia just fixed an AMD Linux bug
by
Alex5723
4 days, 20 hours ago -
50 years and counting
by
Susan Bradley
1 day, 18 hours ago -
Fix Bluetooth Device Failed to Delete in Windows Settings
by
Drcard:))
1 day, 21 hours ago -
Licensing and pricing updates for on-premises server products coming July 2025
by
Alex5723
5 days, 7 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.