Tom,
Here is the SQL of the main table query. You are correct I am trying to find the missing number series of begin and end[Book Number] for a given [County]. I will also be trying to apply a date range to the query, so the user will be prompted for a from and to date to search within. Please let me know if you can help me.
SELECT [Main Table].[Received Date], [Main Table].County, [Main Table].[Book Type], [Main Table].[Book Number], [Main Table].Suffix, [Main Table].[Original Format], [Main Table].[Beginning Page Number], [Main Table].[Beginning Recording Date], [Main Table].[Beginning Instrument Number], [Main Table].[Ending Page Number], [Main Table].[Ending Recording Date], [Main Table].[Ending Instrument Number]
FROM [Main Table];
Thank you again,
Brad Grove
----- Tom Ellison wrote: -----
Dear Brad:
The T and T1 are not variables. They are "aliases." They are used to
represent separate instances of tables within a query. They can be
very convenient ways to shorthand the full table names in a query even
when there is only one instance of that table. But when a query must
track two instances of the same table (or query) then they are
indispensable.
As a result, you can generally leave them completely alone, changing
the names of the tables, but retaining them as is.
To be able to help you with your situation, I suggest you post the SQL
of a query that shows me what you would have without trying to provide
the missing number ranges. This query should contain the column that
shows the existing numbers. Be sure to tell me which column this
number column is. I will modify this query to produce the results you
desire (well, I think I will.) That should provide a good basis for
me to see what you are doing.
So, as I understand you, you will want the missing number series of
begin and end numbers separately for each County. Is this correct?
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
Mr. Ellison
I think this approach may work for me as well. I have a main table that has a field "Counties" which is linked to another table called "Counties". The "Counties" field in the Main Table is using a list box to pull the data from the "Counties" Table.
For each County listed in the Main Table (which there can be many counties) there is a Unique "Book Number" assigned, but the "Book Number" is not unique between different Counties. So in other words, the "Book Number" field will have identical numbers but not for the same County. (Hope that makes sense). From this info I am also looking for missing "Book Numbers" for a given "County". I am having a hard time appling this subquery to my application. I'm not sure of your use of "T" and "T1". Please let me know what the variables are. Any help you can give me would be greatly appreciated
Brad Grove