|
-
Oct 10th, 2000, 02:29 PM
#1
Thread Starter
Lively Member
How do you create a given range of numbers, i.e.
1 ,2 ,3 ,4 ?
anyone have a clue
thx in advance
-
Oct 10th, 2000, 02:35 PM
#2
Is this what you want?
Code:
For i = 0 to 10 'count 0 to 10
Debug.Print i 'print 0-10
Next i 'loop
-
Oct 10th, 2000, 02:42 PM
#3
Frenzied Member
looks more like
for i=1 to 4
string = string & i & ","
next i
string =left(string, len(string)-1)
-
Oct 10th, 2000, 02:52 PM
#4
Thread Starter
Lively Member
what i meant was (maybe a little unclear on this), I want
to give each order in my ordersystem a number that follows
a range, like -
the first order 1
the second order 2
the hundred order 100
the thousand order 1000
the 4thousandAND6th order 4006
/patrick
-
Oct 10th, 2000, 03:35 PM
#5
I still don't understand. Please elaborate further.
Did you mean an array?
Code:
Dim MyArray(1 To 4006) As Byte
MyArray(5) = "ABC"
MyArray(105) = "DEF"
MyArray(2042) = "GHI"
-
Oct 10th, 2000, 04:35 PM
#6
Thread Starter
Lively Member
ok...maybe an Array can accomplish this, but anyway this
is how I intended at first :
user x orders 4 articles in the database, to complete the
order he must specify an ordernr for this order - as it is
now im using the randomize engine to give the user a random number, but for statistic reasons and other I would like to give this user a given number range...
user x orders 4 articles - randomize.... - gets 53664
instead of this I would like the user to get 12 if that is the next number in the range...
next time the user places an order he should get the number
13 instead of a randomized number
the 89 time someone places an order he/she should get the next number in the range (hopefully 89), catch my drift?
/thx for the interest - Patrick
-
Oct 10th, 2000, 04:47 PM
#7
Frenzied Member
In your database, store the order number by customer number, then increment the stored value whenever the customer places an order.
tbl CustOrder
fields:
Customernumber longint
Ordernumber longint
-
Oct 11th, 2000, 06:58 AM
#8
Thread Starter
Lively Member
thx
yeah, that was a great tip .... (with a little hazzzzzle it worked)
thx man
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|