A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculating numbers, part 3



 
 
Thread Tools Display Modes
  #1  
Old June 30th, 2007, 12:08 AM posted to microsoft.public.access.gettingstarted
Etta
external usenet poster
 
Posts: 32
Default Calculating numbers, part 3

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.

  #2  
Old June 30th, 2007, 06:02 PM posted to microsoft.public.access.gettingstarted
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default Calculating numbers, part 3

Don't you just need to add 1 for the [Start_Number]?

=Nz(DSum("Number_Issued","DocumentsIssued","Form_N umber =""" & [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

"Etta" wrote:

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.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.