|
-
Jan 17th, 2003, 05:36 AM
#1
Thread Starter
New Member
Random Numbers and Database help!! PLZ!!
Hi, I need help with the following program in visual basic
Its a route march program for an army friend of mine..
The idea is to keep a database of names, input the Max Routes overall , Routes to be run per day and days to run consecuatively. He wants an outputted list Containing names and routes to be run each day per person (On 1 big list) as defined by program parameters. The other thing that he would like is that if a Name ran route 2 first then exlude that route again. e.g. random number and if the same route is generated again re-generate until its not a previous route.
I have all the forms done, enabling him to add/delete/edit the names (table1) and
Route data(Table2)
Basically he inputs a list of names and then the following other data..
Max Routes (i.e. 1-10)
Routes Per Day (i.e. 5)
Days (i.e. 2)
Esentially the idea is to generate a list of numbers and add them to the database
Next to the names..
i.e
Max Routes = 8.. Routes Day = 4.. Days to run = 2
Day1 Day2
Name R1 R2 R3 R4 R5 R6 R1 R2 R3 R4 R5 R6
Joe Bloggs 1 4 6 3 X X 2 5 7 8 X X
i.e
RND(Max Routes) ... Check to make sure same number has not been generated previously (If so Re-Gen)--- Add to data base -- Continue until finished with 1st name and then work through the list of names.
ANY help would be much appreciated!!
I need to know how to generate the numbers Using a Field from Table2 (i.e. RND? Where ? = Database number Field)
Check that the number isn¡¦t a duplicate (reroll if so)
Add the number to the database and work through the list
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
|