Search results

  1. H

    Multiply values in the same field

    Ok, I see. Then back to work:) Thanks!
  2. H

    Multiply values in the same field

    Hi, I have tried a long time to fix this issue, but I am stuck. Could someone help me out here ,please?:):banghead: I have a field called "Test" Id Test 1 2 2 4 3 6 Output from my query: 48 How can I get 48 as the result from the query? Its...
  3. H

    Code for the month before this month

    Thanks a lot, Plog! But I had to change it a bit to get it to work. The final code that works: =UCase(MonthName(Month(DateAdd("m";-1;Date()))))
  4. H

    Code for the month before this month

    I have this code: =UCase(MonthName(Month(Now()))) It prints out June, but I need it to print out May. How can I do that?
  5. H

    Multiplication in a query

    Thanks! That worked! The final working code: Private Sub Command40_Click() Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT * FROM Numbers") Dim test As Integer test = 1 If Not (rs.EOF And rs.BOF) Then Do Until rs.EOF = True test = test * rs.Fields("Number")...
  6. H

    Multiplication in a query

    Private Sub Command40_Click() Dim rs As DAO.Recordset Dim test As Double Set rs = CurrentDb.OpenRecordset("SELECT * FROM Numbers") If Not (rs.EOF And rs.BOF) Then Do Until rs.EOF = True test = rs.Fields("Number") 'Move to the next record. Don't ever forget to do...
  7. H

    Multiplication in a query

    Ok, thanks,Pbaldy! I am going to write the function and add it here.
  8. H

    Multiplication in a query

    I try to multiply all records in a field in Access. For example: 2*2*3*3=36 ID Number 1 2 2 2 3 3 4 3 How can I do that with a query? is it supported?
  9. H

    Running sum of percentage field

    I found out the solution and the solution was the following: SELECT Month, Sales, DSum("Sales","table1","ID <=" & [ID]) AS RunningSum FROM table1; Thanks Access Programmers:)
  10. H

    Running sum of percentage field

    I am trying to make a query that give me an output of an aggregate percentage column, or running sum of percentage. Please see my example: Month Sales in % Running sum percentage Jan 5.03 % 5.03 % Feb 2.17 %...
  11. H

    Data from two tables

    Please see the attached excelsheet.
  12. H

    Data from two tables

    I have two tables, table 1 with these field: - ID (pk,auto) - Orders - Market - ProductLocalName Table 2: - ID(pk,auto) - Product - GlobalMarket - MarketArea - PlannedOrders My goal is to SUM the Orders in table 1 (local orders) and compare it with the field PlannedOrders in table 2 and get...
  13. H

    Help with a query

    Sorry for that last post. You've solved it:) Now I got what I want. SELECT * FROM Motortable LEFT JOIN subInStock ON Motortable.Motors = subInStock.Motors WHERE (((subInStock.Motors Is Null)); Thanks for all help:)
  14. H

    Help with a query

    I am not getting one motor, but all motors that is "Installed". I have multiple motors with the same name and someone is "In Stock" and some is "Installed". I want to get a list with only the motors which is "Installed" and have not any InStock if the motor has the same name.
  15. H

    Help with a query

    Something like these: SELECT * FROM Motortable LEFT JOIN subInStock ON Motortable.Motors = subInStock.Motors WHERE (((subInStock.Motors Is Null));
  16. H

    Help with a query

    Thanks for help:) I need some help to understand. The subInstock query is ok, but what do you exactly mean by the rest?
  17. H

    Help with a query

    I have two colums in a table in my database. The first one is a list of Motors and the second one a column with the Status of this motors. For example: ID Motors Status 1 Mot01 Installed 2 Mot01 Installed 3 Mot01 In...
  18. H

    Sum with recordset

    Hehe:) I solve the problem my self. Thanks. The solution was Sum1 = Sum1 + v1("Weight") instead of Sum1 = (Sum1 + Vekt1)
  19. H

    Sum with recordset

    I have not said "doesn't work", but I can explain the issue further yes:) My goal is to make a running sum from the field "Weight" in the table "scale1". Start at the top of the record, for example go down record for record and sum the weights together: id weight (kg) 1 1000 2...
  20. H

    Sum with recordset

    Hi all! I have a recordset and need to calculate a running sum in the table "scale1". It works with one weight put into the table one for one, but not when you put in multiple records with weights. I know I can use DSum(). Some suggestions on runningsum with recordset? Dim d As Database Dim...
Back
Top Bottom