Show Me The Last 4 Invoices For Every Customer
Aug 5, 2005
I have a table with every invoice I have raised to my customers on it (160,000 records so far). Every record identifies the customer and the date of the invoice. I would like a query that returns details of the last 4 invoices raised to each customer based on the date of the invoice. So, if I have 100 customers I would expect 400 records returned. I have spent ages searching and reading the forums re this and have seen several post that I "think" are similar, but I think I'm too daft to understand the solutions put forward. I "think" this involves a module to count but as I have never written a module in my life am a bit confused. Any pointers would be greatly appreciated.
View Replies
ADVERTISEMENT
Apr 15, 2013
I am building a replacement Access 2013 database for our ageing Access 2003 database. I have an invoice form with a subform with a combo box that allows me to select which jobs to invoice based on the customer selected in the invoice form, which is working fine. I have designed my invoice and have the criteria [Forms]![Invoice]![ID] in the report query so that it just selects the record that is open in the invoice form. I have an ID (which is the invoice number) group on the report and it is then sorted by date and then job number. I thought it was all working fine when I tested it, it is the same method as I used in the 2003 database. However I have a problem, when I make up and print the customers first invoice it works fine, but when I go to make up a second invoice for the same customer the invoice includes all the jobs from the first invoice as well, and if I then go to reprint the first invoice all the jobs from the second invoice as there as well.
View 1 Replies
View Related
Mar 4, 2015
I am trying to have a query sort out my invoices by year but also to have the possibility to show all invoices.
I have one table "INVOICE" where I have a column "YEAR" calculated with DatePart function from the invoice date.
On my form "INVOICE LISTING", I want to have a combox "Combo957" selecting the year. I have forced the "ALL" selection to the combox using a UnionQuery.
My problem, I cannot get the query to work. I have tried many ways, the closest I can get is :
IIf([Forms]![Invoice Listing]![Combo957]="ALL",([Invoice].[Year])<Year(Date()),[Forms]![Invoice Listing]![Combo957])
If I select the year from the combo, it works, if I select "ALL" nothing is shown.
here is the full SQL
SELECT DISTINCTROW Companies.Company, Companies.City, Companies.Country, Sales.Brand, Sales.Type, Sales.Date, Sales.QuoteNo, Sales.Delivered, Sales.Account, Sales.Branch, Invoice.InvoiceNumber, Invoice.InvoiceDate, Invoice.CustOrderNumber, Invoice.PaymentTerms, Invoice.DueDate, Invoice.NetAmount, Invoice.TotalAmount, Invoice.Tax, Invoice.PaiementRCVD, Invoice.Overdue, Invoice.Month, Year([Invoice]![DueDate]) AS DueYear, [Invoice]![month] & " - " & [Invoice]![Year] AS InvoiceMonth
[Code] .....
View 5 Replies
View Related
Feb 22, 2006
Hi all, i have a query which will be used for reports, and only the last order placed by a customer is needed to be shown. Here's the table used in the query:-
tblCustomerPurchases
CustomerNumber
PurchaseNumber - PK,Autonumber
DateOfPurchase
SeasonID
TotalCost
So obviously for one customer there can be several orders, but i just want to show the latest one by the date field. I have tried grouping by the date field on both Last and Max, but with all the other fields from the table in the query (i need to have all the fields from the table for the report by the way) it still shows all the orders for a customer.
If i only include the customernumber field and dateofpurchase field and then group by date i have 4923 records, which is the correct amount, only one order per customer (the latest one) but adding any other fields to the query gives me the full 7000 odd orders (several per customer).
Any help would be much appreciated, many thanks in advance.
View 9 Replies
View Related
Nov 4, 2014
I have a query that selects a group of customers and order dates.
I want the query to only show the most recent date for each customer.
How would i achieve this?
View 2 Replies
View Related
Oct 11, 2004
When I open one of my tables or queries and look at the customer Id, the displayed info is a single digit. On my customers table my primary key is the customer Id with auto number with the format like this: "ID"000. This is great however, when you look up the customer id in other tables it only displayes the single digit. I want it to show up like ID001 or ID002. In the customers tables it looks just like that, but if you click in that cell/field it takes away the ID and just shows the 001 or 002. I changed the format in my other tables under customer id to "ID000" but that didn't seem to make a difference. I would like to be able to do a search lets say by customer ID in one of my products table and when I type ID005 or ID012 it takes me to those records. But right now I would have to enter 5 or 12. Datatype in my other tables on field customer ID is set to text. Do I have to do a validation rule? How can I get it to show up the way I want it?
View 7 Replies
View Related
Aug 19, 2014
I need a report that show Total ordered for week by Fish for a single customer. I have customer table and OrderDetals table with order date. Shipping date Monday to Friday. When preview the report the it shows the current week Total order quantity for each fish for single customer. How do I get this.
View 2 Replies
View Related
Sep 7, 2012
create a check on a feild(customer id) of customer table in MS Access , as "Customer ID is of 8 characters, the first 4 are alphabets and the last 4 are digits"
View 6 Replies
View Related
Dec 11, 2013
I have a Table Sales - that lists customer and order information
Most of the customers are new - is there a way to populate Customer Name Table with a new entry each time a new customer is input into the Sales Tale
(Without having to add the custome to Customer Name Table - then going to Sales Order)
OR
Failing that - is there a way to use a list box that points to Customer Name Table (and if it doesn't find the one you want, will allow you toadd a new record) In the SAME form as you use to add to Sales Table.
So:
Date (textbox linking to form.Sales) Customer Name (List Box linking to form.CustomerName + adding the info to form.Sale)
View 6 Replies
View Related
Dec 24, 2011
I have a DB set up with a debtors table (Customers) and a Customer Contacts table, I was thinking of combining these two tables into one.Most of the Debtors are companies, but a few are actual people. With the current setup, i need to have both a debtor and a customer in two different tables, but with exactly the same data.
View 1 Replies
View Related
Mar 4, 2008
Hello,
Thank you for your time.
I want to set up an automated recurring monthly invoice for clients in my database.
I know this is possible but I am having trouble finding the solution and in fact having problems how to search for a solution.
On the 1st of every month I would like to have a query run that inserts a new row into my invoice table for all current clients invoicing them for that month.
Please please help. Invoicing one at a time using a form is taking far too long each month.
Thank you.
View 3 Replies
View Related
Sep 21, 2005
I have a table called vendors in that table is Company Name,
address, city, state and zip. I also created a form called vendors same information. On the form i have a combo box called bill to party which selects the name that will print on the invoice.
Ex Company Name ABC
Address What Ever
City State Zip
Phone
Billed to party (here is the combo box on the form)
However when i select the bill to party on the form from the combo box it is only showing the name of the billed party on the invoice and not the address city and state.
I dont want to create extra text boxes on the form so when i chose the bill to name on the form will fill in the text boxes I dont want to do this. All i want is to select the bill to party from the drop down menu and when i view the invoice it will automatically show up on the invoice.
View 3 Replies
View Related
Jul 11, 2006
I have a report that produces invoices and gets its data from a multi-table based query. The query has multiple lines for each customer and the report groups and totals them. How can I have the invoices numbered sequentially? Any help please?
View 2 Replies
View Related
Aug 2, 2005
What Im trying to do is make invoices that I have in to data base...
reason for it is to keep a close watch on the price fluctuation since the stuff we get are from different country. We don't really need it but this is my own little project just for myself...I have all the tables made and form ready but I have couple of problems.
1. How do I calculate and save it in the table? I Know this violates 3rd normalization but I need to do this since the price will change almost every week. basic calculation which is total price / quantity.
2. How do I get the previous record on the form automatically? lets say that the date I put in is July,4,2005. How do I get this to show up in form for the new data input? and keep that date until it is updated using form.
3. Since I'll be getting same stuff lots of times, and since they all have item number, How do I get it to auto fill? lets say that I input a item number and rest of the form automatically fills in the rest of the values...and updates are saved to the table and next time I input the same item number updated data will automatically fill in the rest.
Thanks in advance. This is my first post so, please go easy on me...:)
I also search the forum but couldn't find anything that I understood...
Is this a project too advanced for newbies? As I have stated earlier, I have everything layout but I'm just trying to make it easier inputing new data.
and all the codes that are here, I'm lead to believe they are Visual Basic.
and good book for newbies on VB?
Thanks. and sorry for the long post...
View 1 Replies
View Related
Oct 31, 2006
Hi everyone,
I'm sort of new to Access, but over the past few months I've been able to develop an inventory database for my work which turned out quite nicely and does everything I need it to, except for one thing.
I want to also create invoices for my customers, and after looking at examples I understand that most people link the "order" with the invoice, so that there is one invoice per order. However, I need the ability to combine many orders into one invoice. That's where I'm stuck.
I don't know how to arrange my relationships and forms so that I can "pick" the orders I want on my invoice, and not at the time of the Order, but at some point after. Basically my orders will be established, but their allocation to invoices won't, until I come along and put them into their rightful bill.
Does anyone have any thoughts on this? I'm pretty stumped.
Thanks a lot for your help.
View 2 Replies
View Related
Mar 25, 2007
I'm creating a database where I have a customers and invoices table, obviously there is a relationship between the two tables using a customerID field where I have referential integrity enabled. However not all invoices require a customer account as some are cash sales where no customer details are required.
I'm unsure of the correct procedure, all I can think of is to create a separate table for cash sales??
View 3 Replies
View Related
Sep 15, 2015
I have a pretty simple database that we use to track customers, orders, invoices, and payments. I have an order form that shows all of the order details, and has a subform with services, qty, price, etc. Sometimes we need different products that are part of the same order to appear on two different invoices (say an order is for part 100 and part 101. If part 101 ships first it needs to be invoiced, and part 100 will be on a separate invoice when it ships later), so one order can have multiple invoices.
I'd like to create a solution where when a user clicks the invoice button on the order form, they are able to select which lines from the subform should be invoiced on that particular invoice.
View 9 Replies
View Related
Feb 14, 2005
Is there any way we can convert the amount in numeric form to text format Eg: $ 1000 as Thousand Dollars.
I need this for generating invoices.
Thanks in advance for the help...
Rajesh
View 2 Replies
View Related
Mar 21, 2013
I have a table which has sentdate invoices and paiddat invoices. i want to be able to get a monthly count for the amount of invoices sent and paid to compare on a graph. e.g jan 2011 = 5 feb 2011 = 6 ect
View 1 Replies
View Related
Jul 7, 2014
I am importing data from a supplier. The table has many invoices included and varying items on each invoice. I need to find a way to separate each invoice with all the included items. For example:
inv# pieces linedesc amount
11 500 nuts $20
11 100 bolts $15
11 75 washers $10
12 150 cameras $75
13 10 desks $150
13 10 lamps $50
View 4 Replies
View Related
Nov 15, 2006
We have a billing scheme in which we partial-bill ceratain customers based on certain events: 30% when they sign the contract, 30% a number of days later, 30% when we ship the goods and the last 10% upon installation. This is a common process, known in many indistries as 'progress billing.'
What I am trying to do is compare the collection performance on the invoices based upon which trigger sent them. For example, I'd like to find the average and standard deviation (plus some percentiles) of the time it takes to collect invoices that are sent... when we ship, let's say.
I have a table that shows order number, invoice number, invoice date, amount and payment date. So, I can have the order number show up to 4 times with a chronology of invoice dates.
My question is this: How do I group for analysis all the FIRST invoices, the SECOND ones, etc...?
Thanks for any help! I can do this in excel... but I was given this extract of 100000+ lines, and hope to do it all in Access. Thanks again.
View 2 Replies
View Related
Jul 7, 2014
I am looking to make an invoicing database.
I create 30 invoices a month. each client gets billed the same amount each month (for example Customer A gets billed $100 every month, Customer B gets charged $200 each month). Only two things get changed on the invoice-'Description' (for example the description would be 'services rendered for July 2014' for July invoice) and 'Invoice Date'.
Now please see the image attached, I have an append query that combines information and creates invoices for all 30 clients.
The problem is, the 'Invoice No' field in the invoice table stays empty, because I do not know how to start numbering at a specific point (for example invoice numbering should start at 14150001) and I want it to add the number (+1) automatically when this append query adds data to the invoice table.
View 13 Replies
View Related
May 19, 2012
I need to create buyer and seller invoices within my access 2003 databases, my sister in law runs an antiques auction house and I'm working on a database to capture all their information.
I've created a 2 queries (a buyer invoice and seller invoice), show all unsettled items with the relevant item information and fee's.
However, I would like it to automatically allocate an invoice number, and store the information back to a table (seller and buyer ID, total number of items on the invoice, total fee etc)
I'd like store the invoices as well, so within the customer record form, I can include a box showing a list of the buyer invoices on one side and seller invoices in another (not all customers are buyers and sellers).
Once I've issued an invoice, can I automate it to show that item as then as invoiced?
Can the invoices be editable at all?
When they come in and settle their account, I also need to feed this information back in as well.
Can i arrange an invoice for seller's particularly, to show all sold items, and the fee's associated with them
Returned items as well as any associated fee's with them?
I have been looking at the Northwind example.
I see how they have an orders details table and orders table, I could replicate this.
I could have an Buyers Invoice table and Buyers Invoice Details table, but how do I generate an invoice, pull the next Invoice number from my (currently blank) invoice table, and pull in the outstanding items for that buyer for that specific auction date (I have a query), and then populate back information from the invoice?
I like the fact that their order form is editable, do any changes go back to the query, that then populate the invoice when you click print invoice?
I need to be able to (at the end of the auction) pull all items from my item log, for that buyer, and print them an invoice, automatically saving all the invoice details back into my database.
I need be able to automatically flag the items in my items table, as invoiced and pull the invoice number in?
I can see how all the Northwind tables, queries, and forms relate to each other and subforms, but I'm not sure how to actually create an invoice, get invoice number, merge with my query, and then feedback in.
View 1 Replies
View Related
Feb 5, 2008
Hi guys,
As you all know, in the Northwind sample database there are the Invoices and Invoices Filter query. The Invoices Filter query adds a criteria to select only items that belong to the current order. OrderID is integer.
However, if I change OrderID to Replication ID, it stops working.
Any idea how to make it work? Currently I work around this problem in my DB by adding a criteria to filter by Date and Customer ID, but IMO this is less than ideal.
View 8 Replies
View Related
Jul 22, 2014
I am printing invoices and need to print the label in a subreport at the end of each customer only once. This is what I want it to look like:
2014 payments applied to cap: GA $8,078.00
NC $1463.00
SC $155.00
NOT
2014 payments applied to cap: GA $8078.00
2014 payments applied to cap: NC $1463.00
2014 payments applied to cap: SC $155.00
I use ACCESS, but I do not know SQL. .
View 5 Replies
View Related
Apr 17, 2015
how to design a form that can pull multiple invoices data related to the same purchase order number?
View 14 Replies
View Related