Create a sequential stock number ??? 
Author Message
 Create a sequential stock number ???

We have put together a new Access 97 database. We would like  to be able to
allocate a number to the "Stock Req Field"  of our "orders" table.  The
number must be sequential. We need the facility to assign a block of numbers
and when they are used assign another block not neccessarily sequential to
the first.

Block 1.    100 to 200 (when the 200th number is used, the user must request
the next batch from the administrator)
Block 2.    250 to 300 (middle 50 have been allocted elswhere)

The administrator needs to be able to open a form of some description to
assign the next block and all this has to work well in a multi user
enviroment.

Whilst we have VB6 and are currently wading through "Beginning Visual Basic
6" From Wrox print (got a bit confused in the Array's section, I mean what
is all that about ??) we dont know much about code, I'll re pharse that, we
dont know anything !.

We have posted this qestion before trying to use a custom counter to deal
with the problem but we are not sure that this is the right way to go any
help would be appreciated.

Geoff & Mel Aukett



Sun, 22 Apr 2001 03:00:00 GMT  
 Create a sequential stock number ???
I have done this sort of thing before.  Your logic needs to be something
like this:

1. Determine what block is this user supposed to be using.
2. See what the last number used in this block was.
3. Assign the next number if it is within the range of the block.
4. If it is outside of the block request new block from Admin.

I would use a combination of code and SQL to do these steps.  You will need
to know how to use recordsets to look up information and set values in
tables.  This may be a little tricky if you are not used to writing code.
Just out of curiosity does this mean that the person who built the database
did not have to use any code so far? or is that person not available?

You can Email me directly if you want to see examples of code.

Randy

Quote:

>We have put together a new Access 97 database. We would like  to be able to
>allocate a number to the "Stock Req Field"  of our "orders" table.  The
>number must be sequential. We need the facility to assign a block of
numbers
>and when they are used assign another block not neccessarily sequential to
>the first.

>Block 1.    100 to 200 (when the 200th number is used, the user must
request
>the next batch from the administrator)
>Block 2.    250 to 300 (middle 50 have been allocted elswhere)

>The administrator needs to be able to open a form of some description to
>assign the next block and all this has to work well in a multi user
>enviroment.

>Whilst we have VB6 and are currently wading through "Beginning Visual Basic
>6" From Wrox print (got a bit confused in the Array's section, I mean what
>is all that about ??) we dont know much about code, I'll re pharse that, we
>dont know anything !.

>We have posted this qestion before trying to use a custom counter to deal
>with the problem but we are not sure that this is the right way to go any
>help would be appreciated.

>Geoff & Mel Aukett



Sun, 22 Apr 2001 03:00:00 GMT  
 Create a sequential stock number ???
Thats exactly it, the adminsistrator needs to be able to allocate the new
blocks by way of form and the user needs to be able to add the next number
in the current sequence to the SRN field.

In answer to your questions we put the database together ourselves, it
consists of seven tables with various forms and subforms, we managed not to
use any macro's (baring Autokeys) as we read that macro's were not very good
in multi user enviroments.  Instead we created command button's to do the
jobs we wanted (moving around between forms, with filters e.t.c) then cut
and pasted the code that the wizards generated to the places we needed it.
We have not put any of the reports or other forms that will be needed in yet
as we have been unable to solve this problem.

If you could help we would be very grateful although we appreciate that our
limited knowledge could make this process difficult.

Geoff & Mel Aukett

Quote:

>I have done this sort of thing before.  Your logic needs to be something
>like this:

>1. Determine what block is this user supposed to be using.
>2. See what the last number used in this block was.
>3. Assign the next number if it is within the range of the block.
>4. If it is outside of the block request new block from Admin.

>I would use a combination of code and SQL to do these steps.  You will need
>to know how to use recordsets to look up information and set values in
>tables.  This may be a little tricky if you are not used to writing code.
>Just out of curiosity does this mean that the person who built the database
>did not have to use any code so far? or is that person not available?

>You can Email me directly if you want to see examples of code.

>Randy



Fri, 27 Apr 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Creating Sequential Numbering in Labels

2. Adding a sequential date count number to an imported table

3. Get records if sequential numbers are found

4. Sequential numbers in labels

5. Sequential Numbering in Query

6. Sequential Numbering

7. How to generate a sequential number for each new form

8. generating a unique (sequential) number to subject line

9. massaging the format of sequential numbers

10. Printing Sequential Page Numbers

11. Generating Sequential Numbers

12. Sequential Number for a form

 

 
Powered by phpBB® Forum Software