Search results

  1. M

    Adding MsgBox to For Each Loop

    I am using the following code to import records into a table if they meet certain criteria, then once it has been imported, the file is moved to another location. This works extremely well. Private Sub bImportFiles_Click() On Error GoTo bImportFiles_Click_Err Dim objFS As Object, objFolder...
  2. M

    Append time onto short date

    Perfect!! :)
  3. M

    Append time onto short date

    I have a totals query that displays the sum of what products we ship each day. A process in the system automatically assigns the date/time to a ShippingDate field when an item is marked as despatched. The totals query allows users to view what products are shipped between a period specified by...
  4. M

    Dates in a Query

    That's perfect, is there a way to have the dates in order, April 2013, March 2013....April 2012?
  5. M

    Dates in a Query

    Sorry, full code of query so far SELECT SOP_History.Ord_Date, SOP_History.Qty FROM SOP_History INNER JOIN items ON SOP_History.Stk_Code = items.ItemCode WHERE (((SOP_History.Ord_Date)>=DateAdd("m",-12,Date()))) ORDER BY SOP_History.Ord_Date DESC;
  6. M

    Dates in a Query

    I used something similar, >=DateAdd("m",-12,Date()) But both include the records from last April that I want to omit
  7. M

    Dates in a Query

    I want to create a simple query from a list of orders dating back over 12 months. The fields I have is Ord_Date, Qty I need to show the orders by month for the last 12 months. The problem I am getting is that the orders for the month of April (as we are in April now) contain orders from 1st -...
  8. M

    Query with a few conditions

    Awesome, appreciate the help that you provided, I have now managed to merge it into the database and it works great. Thank you for your patience
  9. M

    Query with a few conditions

    Definately part of criteria Not displayed, the results are to display what is moving slowly or not at all, so we can identify them and make some decisions.
  10. M

    Query with a few conditions

    I'm not getting it, the quantity is part of the criteria as we list thousands of items in the table and hundreds of them will show zero stock so they will not need to be shown, similarly, the quantity also needs to multiplied by the cheapest supplier of the goods to give an estimate of stock we...
  11. M

    Query with a few conditions

    For part of the query as items that haven't sold at all will not have any history e.g. iMac Quantity on hand to calculate the value we are holding. So, the query is to show what stock is not selling and is broken down into 2 parts 1. Part of the query will calculate what has not sold for 30...
  12. M

    Query with a few conditions

    I have attached a sample db, I think I have captured the fields that would be relevant. The results I would hope to see are item qty cost of stock iPod 49 £2,401 //primary/cheapest is £49 - as last one was sold over 30 days iMac 20 £8,800...
  13. M

    Query with a few conditions

    I'm trying to build a query but am having some difficulty, each part works independantly but not together in one query. I have two tables and an optional table (details at bottom of thread for this) tblStockItems (Fields: itemID, itemcode, quantity) tblItemsSold (Fields: itemcode, datesold)...
  14. M

    Button to alter calculation

    Genuis! Works a charm and boss very happy... Thank you Paul & Bob
  15. M

    Button to alter calculation

    I have tried numerous variations of what to include but each time is keep saying that this part of the code "Me.Parent!ControlName" creates a run time error 2471 The FieldName I'm guessing is the control on the subform The Me.Parent!ControlName is the name of the field on the main form? The sub...
  16. M

    Button to alter calculation

    Hi Paul, that worked, we now have totals. However, they seem to way off the mark. I think what has happened is that the subform is filtered on one product that the user selects in the parent form. The code supplied by Bob now totals the Qty for all sales rather than just the filtered...
  17. M

    Button to alter calculation

    Oops, I have reverted back to the date. Thanks! The form still displays a blank box, did the closing ) go in the right place.
  18. M

    Button to alter calculation

    Thanks Bob, I followed your instructions, it did say that a ) or ] was missing, so I filled it in, I think I put the ) in the right place. Me.ebayTotal = DSum("Qty", "TableNameHere", "Left([Ord_Ref_Own],1)='E' And [Ord_Date] >" & Format(DateAdd("d", intNumDays, Date), "\#dd\/mm\/yyyy\#")) The...
  19. M

    Button to alter calculation

    Thanks, I created an unbound box called ebayTotal in the footer and a command button called sevenBtn I then added the following Private Sub sevenBtn_Click() ebayTotal = Sum(IIf(Left([Ord_Ref_Own], 1) = "E" And [Ord_Date] > DateAdd("d", -7, Date), [Qty], 0)) End Sub It failed when I...
  20. M

    Button to alter calculation

    I have a unbound field in my form footer that calculates the qty of products sold in 30 days. =Sum(IIf(Left([Ord_Ref_Own],1)>"J" And [Ord_Date]>DateAdd("d",-30,Date()),[Qty],0))Instead of this I want to creat a series of small command buttons for 7 days, 14 days, 30 days etc How do I assign a...
Back
Top Bottom