Recent content by SalesOp

  1. S

    Appending the most recent record

    Thanks plog, worked like a charm.
  2. S

    Appending the most recent record

    Hi Plog, When I create the sub1 subqyery exactly as you suggested: SELECT tblEmployeeData.EmployeeID, MAX([MonthId]) AS MostRecentOrderedField FROM tblEmployeeData; However when I try to create an append query with sub1, I get an error "Your query does not include the specified expression...
  3. S

    Appending the most recent record

    Dear Plog, Thanks for the response. I tried the but I must be doing something wrong. Kindly look at the attached DB. At the end I should only have the most recent records ordered date wise. The old records should not be copied. Thanks
  4. S

    Appending the most recent record

    Hi all In an append query with employee records that may have different information, I would like to only append to a new table the most recent record when multiple records exit for the same employee. With a primary Key in Employee Id how can I do this? The employees location, title, manager...
  5. S

    Append Query - without sort

    I am appending employee hierarchy and each append is the next level manager. I did not want to create another field for the manager level but I guess I don't have much of a choice. Thanks for your support
  6. S

    Append Query - without sort

    Yes it does have a Key field.
  7. S

    Append Query - without sort

    Hello, In an append query with a Key field I find that the records seem to be automatically sorted on the Key field. They get inserted in between the records. I would like the new records to be appended to the bottom of the table. I have tried to look into the table sort orders but couldn't...
  8. S

    Totals Query - Return accounts that generate 80% of sales

    Many thanks jdraw, I will try it out, much appreciated
  9. S

    Totals Query - Return accounts that generate 80% of sales

    Hi Minty Thanks for the help but I am still a bit stuck. Once the sales figures are sorted in descending order with the percentage of sales in right column, how do i get the top accounts whose sales sum up to 80% of the total sales value. AccountId ProdCat AccTotal PercOfTotal R10002 Retail...
  10. S

    Totals Query - Return accounts that generate 80% of sales

    Sorry the data was linked, Now attached again with actual table.
  11. S

    Totals Query - Return accounts that generate 80% of sales

    Hello, I am trying to do a Totals query that would return accounts that produce 80% of the total revenue. I hope to sort the sum of revenues from each account in descending order then select these top accounts whose revenue sum is 80% of the total sales. The idea is to find out which and how...
  12. S

    Only display query results if records found

    Thanks for replies, However, this will entail that the query will be executed twice once to compute the number of records for Dcount and the 2nd time for OpenQuery and display the results. Seems a bit inefficient if the query is complex. Any thought?
  13. S

    Only display query results if records found

    Dear Experts In access macro I would like to display the results of an OpenQuery only if the query returns records. I don’t want to open empty query result sheets. I know that DCount() returns the number of the records in a query but I am not sure how to use it without actually opening an IF...
  14. S

    Joining queries created with QueryDef

    Hi Arnelgp, Many thanks, surprisingly the function is very compact. How exactly do I run it? Do I iterate from the highest level manager Level 5 and then it will recursively call all the below level managers and Level 0 staff. Each call will return the rolled up revenue for that manager, etc...
  15. S

    Joining queries created with QueryDef

    Hi All, I need a way to create successive select queries and join the next query with the previous one in VBA using QueryDef. Example Query Level 0: RevenueRollup_sub_0 SELECT SalesRevenues.EmployeeName, SalesRevenues.SalesRevenue AS TotalRevenue, SalesRevenues.ManagerName FROM...
Back
Top Bottom