Should Be Easy For Someone - Show Only Last Customer Order, By Date?
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:-
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.
I have a client table. I have a client product table for ski's Each Client has 1 or more products (skis)
I have a Service Order table and form that I use a drop down control in the Service order to select the customer.In the Service Order Form a I have a continuous Subform for detailed service.
This is where I'm having the problem.In the detail subform I want to select from a drop down box the customers particular ski that I want to service. how to have only that one customers ski's to show up.
I am trying to use the template provided in the Access database wizards, pages and projects. Its called Order Entry. What i would like to do is edit the template to fit my needs but i need to change the Product ID feild from Autonumber to a product id of my own. I would however like to keep it as the Key.
I am trying to use the template provided in the Access database wizards, pages and projects. Its called Order Entry. What i would like to do is edit the template to fit my needs but i need to change the Product ID feild from Autonumber to a product id of my own. I would however like to keep it as the Key.
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.
Long story short, I need to have a command button (using xp) open up a folder where pdf's are stored, so the user can search. (orginally I wanted a pdf to open, then I tried having explorer open, so this is my last idea
I've tried a lot of the code in the archieves but none work exactly.
For example:
Private Sub cmdExplore_Click() Dim stAppName As String
'stAppName = "C:Windowsexplorer.exe" 'above open in a tree view with my Documents; no explorer anywhere to be found
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?
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.
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"
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)
G'day all, I'm a novice to Access. I'm trying to setup an adhoc query, whereby a user can select all the records for a particular month. I've tried using ([month]) in the criteria row but I get an error message??? :confused: :confused:
I am trying to create a database for farm auditing. The idea is you gather information monthly from the same farms and enter this into the database.So as time pogresses for example, farm 1 will have 6 entries for each field in each table, in 6 months time. But i need to be able to see each entry that was put in each month. I do not want it to just show the most recently modified information, and I want it to show the date f these.
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.
I'm creating a database for a flower shop for training purpose. I have a main form with a sub form that has the orders in it. when placing a new order for a client and selecting the product from the combo box, it would be great if the product could show up to the right in the form.
I have no clue if this is possible and how to get it working. I have included the database as an attachment, which way to follow. I remember that I could do this on a web page, but a web page is not the same as a database.
Help - Why don’t my date fields sort in date order ?
I’m having a very annoying problem with my date fields. I have a database that keeps records of patients details and their visits to the practioner.
I have a form based on Patients table with name address etc, and a subform based on a Case Details table with details of visits and advice given etc.
I need the Case Details subform to display the latest visit/record at the bottom (the earlier visits at the top of the list). For some reason I just cannot achieve this. Dates seem to be scattered all over and I can’t understand why ??
I have tried sorting the Case Details table in ascending order, sorting the ‘Date of Visit’ field on the form in ascending order (which does work but as soon as the form is closed and re-opened, all the dates are mixed up again).
In the ‘OrderBy’ property of my Case Details Subform, it says:- [Case Details Table].[Date of Action] which according the help I have tried to look at should sort the records ??
I’d really appreciate any pointers as to where I’m going wrong
I have a database which in one part records customer orders. What I would like to is identify customers who have not ordered for a given time period i.e. 30 days.
I know once I have built the query, I will require a parameter for the time period i.e.30 days.
I started by trying to record the last date ordered for a customer in a query, but am having problems with this. I had a query including information from my table for Orders (tblOrders). This had:
Order ID Customer Name Date Order Required
I do not need any more info apart from these fields.
The results would include all orders, so for some customers there would be numerous 'Order ID' & 'Date Order Required'. In the query, I did try to select the summary option, to group information by Customer - but the 'Date Order Required' was always the first date ordered. What I would like is only the last ones for all customers to be shown.
Can someone provide some guidance on how I can achieve my objective.
I have a report that I want to see the records by Job Due Date. I have it set up where it puts the records in ascending order in the query, and it works, but when I open the report they are not in order anymore. I have checked in the properties window and they are still supposed to be pulled in ascending order by job due date. Why won't it put them in the right order??
I am using Access 2007 and I have had a curious issue arise.
I like to use the Date Picker feature on all my forms to make it easier to enter dates. I have set up each table's date field property to "show date picker for dates", as per attached (.jpg)
When I use that particular field in a form, I also set up the field to allow for the Date Picker option (date picker form property sheet.jpg)
The curious part is that not every form that I set up actually shows the date picker when I select the date field. Some forms it works perfectly, others it doesn't.
I am trying to run a query that will give me all of my customers who last purchased on or before 2004. I do not want anyone who purchased anything in 2005. I am including, name, address, telphone number, salesman, order date, and shipping method. I leave all criteria blank, and I have the order date totaled at "max", I run the query, then I filter the form for the shipping method of "no cod". When I run the query, it gives me my customer listing for everyone who purchased from 1999 on and where shipped out no cod. That is fine, except that some of the customers are listed a few times with different dates. Say, John Smith, my query is coming up with an order from 1-5-99 and then a few pages later, (because I am also putting it in descending order) he is on another page with the date of 2-5-2000. Why is this? In my criterea for the "order date" I have it as "MAX", which should bring me this customer only once. Is that correct? I am really having trouble with this. Can anyone help? I only want the customers listed once with their last order date.
I have tried posting this message before, but with no results. I am trying to get a query that will give me all of my customers and show what their last order date is. The query that I have now is coming back with ALL the dates the customers made purchases. Here is how I have the query set up: Field1 Customer ID Field 2 Customer name Field 3 Address Field 4 State Field 5 Phone # Field 6 Order Date (Last in Group by) Field 7 Shipping Method Field 8 Salesman name
The query is a select query and I hit the totals button on the toolbar. In Field 6-Order date, I have it grouped by "last". Another problem that I have it I am working in a 97 access database. I have tried to convert it to 2003 with no success. So, I am not able to make NEW queries or reports. I can modify them, but when I close the query or report design, it does not save.
Can anyone help me with this query problem? It is very perplexing.