PC Review


Reply
Thread Tools Rate Thread

Assigning numbers in batches

 
 
John
Guest
Posts: n/a
 
      12th Feb 2006
Hi

I have a jobs table in which a client can be assigned to multiple jobs. Now
I need to assign invoice numbers to jobs such that all jobs belonging to one
client get the same first number, all jobs belonging to second client get
the second invoice number and so on. Basically I need to batch jobs by
client so they all appear on the same invoice rather than individual invoice
for each job. How can I achieve this?

Thanks

Regards


 
Reply With Quote
 
 
 
 
tony
Guest
Posts: n/a
 
      12th Feb 2006
Since you probably have a client ID or account number you could use
that number as the prefix for the invoice number and then use a
sequential number as the end of the invoice
For example if the client ID was RS1009
and you were writing the 150th invoice for the year the invoice number
could look like this RS1009-00150 or RS100900150
to find the invoices for the particular customer you would use the
LEFT() function
ie Left([invoiceno],6)
as the criteria in your report query

HTH

 
Reply With Quote
 
salad
Guest
Posts: n/a
 
      12th Feb 2006
John wrote:

> Hi
>
> I have a jobs table in which a client can be assigned to multiple jobs. Now
> I need to assign invoice numbers to jobs such that all jobs belonging to one
> client get the same first number, all jobs belonging to second client get
> the second invoice number and so on. Basically I need to batch jobs by
> client so they all appear on the same invoice rather than individual invoice
> for each job. How can I achieve this?
>
> Thanks
>
> Regards
>
>

Well, you could check to see if the customer exists
'get invoice for that job
lngInv = Dlookup("InvNum","Table","Job = " & Me.Job)
'doesn't exist, get the next number
If IsNull(lngInv) Then
lngInv = DMax("InvNum","Table") + 1
Endif


 
Reply With Quote
 
Graham Mandeno
Guest
Posts: n/a
 
      12th Feb 2006
Hi John

Add an InvoiceNumber field to your Jobs table, related one-to-many with your
invoices table.

When you want to add an invoice, list all the completed jobs for that
customer that have not yet been invoiced (InvoiceNumber is null). Then you
can select which jobs to include on the new invoice. Including a job on an
invoice merely constitutes recording the invoice number in that field.

If you prefer not to be selective, you could automate the system entirely
to:

1) Open a DISTINCT query to list all the customers who have completed,
uninvoiced jobs

2) For each customer, add a new invoice, and then update the invoiceable
jobs for that customer to record the invoice number.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

"John" <(E-Mail Removed)> wrote in message
news:edjGXO%(E-Mail Removed)...
> Hi
>
> I have a jobs table in which a client can be assigned to multiple jobs.
> Now I need to assign invoice numbers to jobs such that all jobs belonging
> to one client get the same first number, all jobs belonging to second
> client get the second invoice number and so on. Basically I need to batch
> jobs by client so they all appear on the same invoice rather than
> individual invoice for each job. How can I achieve this?
>
> Thanks
>
> Regards
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Assigning a value to a set of numbers lesliebantleman@googlemail.com Microsoft Excel Worksheet Functions 0 15th Dec 2006 05:10 PM
Assigning numbers in batches John Microsoft Access Queries 3 12th Feb 2006 08:03 PM
assigning incremental numbers - or getting new numbers =?Utf-8?B?Q2Fyb2x5bg==?= Microsoft Access VBA Modules 8 13th Jan 2005 12:55 PM
assigning numbers faddrickremo Microsoft Access 3 26th Nov 2003 03:34 PM
assigning numbers faddrickremo Microsoft Access 1 25th Nov 2003 03:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:02 PM.