Calculating numbers, part 3

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Although someone (ken?) responded to this question, I am unable to find the
reply...

Hi, Ken,

I should have mentioned that I went with your suggestion of using the
date/time value with the following as the Control Source:
a=Nz(DSum("Number_Issued","DocumentsIssued","Form_Number =""" &
[Form_Number] & """ And DateTimeIssued < #" &
Format([DateTimeIssued],"mm/dd/yyyy hh:nn:ss") & "#"),0)"

How can this be modified to result in 00001 as the start number for the
first package and 00025 the end number for the first package of 25? The
second package of 25 would start with 00026 and end with 00050.

As ever, thanks for your help.
 
Don't you just need to add 1 for the [Start_Number]?

=Nz(DSum("Number_Issued","DocumentsIssued","Form_Number =""" & [Form_Number]
& """ And DateTimeIssued < #" & Format([DateTimeIssued],"mm/dd/yyyy
hh:nn:ss") & "#"),0)+1

For the end number add the number issued and subtract 1:

=[Start_Number]+[Number_Issued]-1

Ken Sheridan
Stafford, England
 
Back
Top