Lost and need HELP!

2rsGarry

New member
Local time
Today, 23:14
Joined
Sep 26, 2007
Messages
1
I am new to using MS Access and am already frustrated that a simple task is getting the better of me.

My situation is that I work for a company that has a number of reps, which are allocated their own ticket books(block). Each book is 50 tickets in size i.e say from number 320500 to 320549. All tickets are entered through our internal system for whatever the ticket was used for.

Now here is my problem. Each block is registered to an individual rep which we need to keep record of as to which tickets are allocated to them, other then having to enter each ticket individually into our ticket block records system, I am trying to make a database entry that accepts the reps name, ticket block start number and then automatically adds the next 50 tickets to that rep, so when we use a search field on any ticket it displays the rep that the ticket was allocated too.

In my head i'm looking for the MS Access way of doing the following:
[tickblockstart]+1 until [ticketblockstart] = [ticketblockstart]+50

Can anyone help me with this probably very easy problem, that i can not seem to grasp at the present time.

Regards

2rsGarry
 
A For/Next loop would work:

For x = StartNumber To StartNumber + 49
'add your record to the table
Next x
 
Have a look at the attached example. The simplest way to do what you want is to use the Dlookup function to lookup the rep Where the starting TicketNumber in a block is less than or equal to your ticket number AND the end TicketNumber in the same block is greater than your TicketNumber.

This example shows how to use the db to help with allocating your ticket blocks (suggesting the next available starting ticket number as well as automating the end ticket number) and also how to show which rep a ticket was allocated to when entering the usage. The example data may not apply to your situation but the general principle should work for you.

Hope it helps
 

Attachments

Users who are viewing this thread

Back
Top Bottom