473,785 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assigning numbers in batches

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
Feb 12 '06 #1
3 1514
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

Feb 12 '06 #2
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
Feb 12 '06 #3
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" <Jo**@nospam.in fovis.co.uk> wrote in message
news:ed******** ********@TK2MSF TNGP12.phx.gbl. ..
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

Feb 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1536
by: datadev | last post by:
visual studio.net seems to default to single batch mode when running sql scripts. does anyone know how to change this behavior? typical batches will include object existence, drop, and create batches prior to processing. i have attempted removing the graphical plan, using batch separator 'go', and the vba trick using ';' to no avail. tia
16
2465
by: StenKoll | last post by:
Help needed in order to create a register of stocks in a company. In accordance with local laws I need to give each individual share a number. I have accomplished this by establishing three tables (se below) then I run a query giving me a running total, which give me the first stock in the batch purchased by an individual, then I use this number and add the number of shares in order to find the number of the individuals' last share. So...
7
2565
by: Shannan Casteel via AccessMonster.com | last post by:
I have a form for entering part numbers along with the associated quantity for each part. There are 25 Part fields and 25 associated Quantity fields. If I go to record 1 and enter part number 1234 for part1, 3 for quantity1, and 1235 for part2, 8 for quantity2, and on record 2 I enter 1236 for part1, 2 for quantity1, and 1234 for part2, 2 for quantity2, how would I get Access to spit out a report that says something like this: Part...
4
2719
by: James | last post by:
Just learning C#. What's the easiest way to assign numbers 1-10 randomly to an array? Basically I just want to take the numbers 1-10 and arrange them randomly in slots 0-9 of an array. Thanks
5
1992
by: jacob.dba | last post by:
I have a table with first name, last name, SSN(social security number) and other columns. I want to assign group number according to this business logic. 1. Records with equal SSN and (similar first name or last name) belong to the same group. John Smith 1234 Smith John 1234 S John 1234 J Smith 1234 John Smith and Smith John falls in the same group Number as long as
2
1321
by: Robert Waggoner | last post by:
I have a table which holds certification numbers that come in batches. The numbers will run from (for example) 456 to 496. I have to enter these numbers individually. Is there a code I could use to append from 456 to 496 to the table? I'd like a pop up form that prompts for the number from and the number to.
41
2379
by: Zytan | last post by:
Anyone do any tests on it? I would assume it has improved since C's rand(), but who knows. For some reason, and it could just be coincidence, I seem to see patterns. But even a crappy rand() function should be good enough to avoid that, so i may be seeing things. Zytan
1
4796
by: Nightfarer | last post by:
Hello. I have a big trouble using System.Array class (it's the first time I use it) for a software I'm developing. I have a form with a textbox(numbers) and one button (done). Once the number is added to textbox clicking the done button saves the number in a variable (Numbers). The next form has a textbox(letter) and two buttons (add new, done). Values inserted in textbox are the values to be added to Array clicking add new button (the...
20
3636
by: kpfunf | last post by:
Hey all, I have a table of receipts used (Table Name: receipts, Field Name: receiptNumber) and a table with receipts issued (Table Name: Receipts Batches, Field Names: BatchID, BegRng, EndRng). Example row in Receipts Batches: 3, 72551, 72600. I need to check the list of used receipts against the issued list and find any "skipped" receipts; that is, find the max used receipt for each batch, and check if any below that number are missing. I've...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.