[AccessD] A2k: Creating an Array from Start and End Numbers
Darren
darren at activebilling.com.au
Mon Mar 23 22:18:36 CDT 2015
Hi Team,
Gustav's suggestion worked like a charm - Many thanks Gustav. You are a
legend :-)
Stuart - This is for storing 'voucher numbers'.
Users will add the first and last numbers in a sequence and now using
Gustav's clever code I can present a list of available voucher numbers using
these first and last numbers.
These will never be static - always on the move so a fixed table won't
suffice but it's what I had in mind first, until the client explained how
their 'voucher' system works.
Again many thanks, team
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Stuart McLachlan
Sent: Tuesday, 24 March 2015 9:18 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] A2k: Creating an Array from Start and End Numbers
That's just one of the countless uses for a "number table" i.e. a table
consisting of a single PK field of integers from 0 to .... Build it once
when you first create your system and you can do things like:
"Select * from tblNumbers where num between 1024 and 1031"
That's if you want that many numbers in your table. If don't have that
large a table, then it would be:
"Select num + 1000 from tblNumbers where num between 24 and 31" :)
--
Stuart
On 23 Mar 2015 at 0:39, Darren wrote:
> Hi All,
> I want to create a sequential array from a start number and an end
> number, that I can present as a 1 column combo list. For example: 1024
> is the start Number 1031 is the end Number
>
> I'd like to see the following 8 items in my combo list after building
> the array. 1024 1025 1026 1027 1028 1029 1030 1031
>
> Any pointers?
>
> Many thanks in advance
>
> Darren
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list