Missing Numbers display/print

A

AHopper

I want to design a form that will display/print missing
numbers in a series.

Table has fields "JobNumber" "SkidNumber" "UniqueNumber"
and "Quantity"
JobNumber SkidNumber UniqueNumber Quantity
211 200 00001 2000
211 201 00001 2000
211 201 00002 4000
211 201 00003 4000
211 201 00006 4000
211 201 00007 500
211 250 00007 3500
211 250 00008 4000
211 250 00010 4000

First I want to eliminate any duplicate UniqueNumbers
so in the case above I would end up with
00001,00002,00003,00006,00007,00008,00010 as a list
Next I want to list the numbers that are missing,-
00004,00005,00009.
If the user defines a range like 00001 to 00015 the
missing numbers would be
00004,00005,00009,00011,00012,00013,00014,00015.
Finally I would like the results to display on screen
and/or print as a report (both if possible) as the user
would choose.I have never displayed results on screen.

I believe the form should have a combobox for "JobNumber"
and two comboboxes for "UniqueNumber" so the user could
define a range of unique numbers or by leaving the unique
numbers blank get results for the entire job. I would like
to use code in the OnClick event of a command button.

I am familiar with Dim, If Then End If, DSum, DCount,
criteria, some DLoop, Select Case, MsgBox and have used
results to determine the next event. I have not used SQL
statments other than in record source for reports (I would
like to learn how to use them more).
I have used
Set CurDb = CurrentDb
Set New = CurDb.OpenRecordset("Package")
With New
and DoCmd.OpenReport stDocName, acNormal, , "criteria"
I consider myself still a beginner.

I would appreciate any help in understanding how to
accomplish this task.

Thanks
Allan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top