[AccessD] FW: Partition Function

Beach Access Software bchacc at san.rr.com
Tue Nov 14 11:46:51 CST 2006


Dear List:

 

FYI.  From another developer.

 

Rocky

 

 

  _____  

From: joe anderson [mailto:jka at alldatacorp.com] 
Sent: Monday, November 13, 2006 9:55 AM
To: Subject: Partition Function

 

Well ... here is a VBA function that I've never seen in 14 years!!  Looks
like it could be pretty useful!!! It's not even in Getz's book ... at least
not in the index at the back!

 

I found it in a cool little book Titled "Fixing Access Annyoances' ... a$20
book that has already paid for itself!  By .. Phil Mitchell and Evan
Callahan.

 

jka


" :-1"

" 0: 4"

" 95: 99"

" 100: "


20

199

10

" : 19"

" 20: 29"

" 190: 199"

" 200: "


100

1010

20

" : 99"

" 100: 119"

" 1000: 1010"

" 1011: "

 

In the table shown above, the third line shows the result when start and
stop define a set of numbers that can't be evenly divided by interval. The
last range extends to stop (11 numbers) even though interval is 20.

If necessary, Partition returns a range with enough leading spaces so that
there are the same number of characters to the left and right of the colon
as there are characters in stop, plus one. This ensures that if you use
Partition with other numbers, the resulting text will be handled properly
during any subsequent sort operation.

If interval is 1, the range is number:number, regardless of the start and
stop arguments. For example, if interval is 1, number is 100 and stop is
1000, Partition returns " 100: 100".

If any of the parts is Null <javascript:hhobj_5.Click()> , Partition returns
a Null.


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.3/531 - Release Date: 11/12/2006
7:34 PM





More information about the AccessD mailing list