Search results

  1. 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...
  2. 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?
  3. 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?
  4. 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 %...
  5. 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...
  6. 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...
  7. 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...
  8. H

    Write to a txt file when the forms loads

    I want to write a line to a textfile every time the form loads. Private Sub Form_Load() Dim fs, textfile Set fs = CreateObject("Scripting.FileSystemObject") Set textfile = fs.CreateTextFile("c:\test\test.txt", True) textfile.WriteLine ("The program started: " & Now() & vbCrLf) End Sub The...
  9. H

    Update and delete recordset in a loop

    I have a database linked to another and the task is to sum each record from scale1, delete current record (after calc sum) and put it into another table in another database. How can I ensure that each record sum, record for record and delete it afterwords? Option Compare Database Private Sub...
  10. H

    Query for a resultlist (ranks)

    I have a list with weights and would like to rank them as 1,2,3,4,5, highest weight to lowest, with highest on the top of the page. If some of these weights are equal I need to check with another field called "How many?" which field are largest and rank them as shown: Rank Weights How...
  11. H

    Running sum with changing colors?

    I have now a label with =1 in it, and running sum "All". So the report print out: 1 2 3 4 5 6 7 and so on. How can I count this records and put it in a variable? I want to calculate 25% of the record and set a red color to them.
  12. H

    Question How to import a html with tables and images with vba

    I want to import a html file with tables and images into my database. Then I want to copy some of the tables and images into a report. Do someone have some suggestions?:) I can use docmd.transfertext maybe, but what about the images? How can I structure the html file in the tables?
  13. H

    Combining queries

    I have 2 queries tha I'd like to combine and show all together, how can I do it without UNION? (Because you have to have tje same nr of columns) Deltagere (Athletes), Vekt(Weight), Konkurranse (Competition), Lagnavn (Teamname), Klasse (Class) My first query: SELECT Deltagere.Lagnavn...
  14. H

    Subquery with sum

    I need some help here... I have 1 one to many relationship with Deltagere (Athletes) and Konkurranse (Competitions). I want to present the sum of the weights (TotalVekt) for each Team (Lagnavn) and the atheletes with their weight in the same query. The sql under shows the teams and their...
  15. H

    Totalsum query is working but...

    I want to ask the database after the teams (lag) with the athletes listed in the team with the highest TotalVekt (TotalWeight). With the code under I find the teams with the highest TotalWeight, but not with the athletes on the team and their weight combined with the totalweight of the team...
  16. H

    Help with form design...

    I need some help with my form design. I have multiple one to many relationship. See the picture(relationships.gif) The problem is to connect Lag (Teams) with Deltagere(Athletes) in the form. One athlete can have just one team and one team can have one or more athletes. I need to first fill in...
  17. H

    3 one to many relationship forms design

    2 one to many relationship forms design Hi all! I want some advice from you. I have 3 tables: Table 1: Competition Table 2: Athletes Tables 3: Team A team can have 1 or more athletes A competition can have 1 or more athletes A competition can have 1 or more teams. When I started to design...
  18. H

    How add a number in sum in the query...

    I need some help on this. I have a Sql here: SELECT DISTINCTROW trades.ID, Sum(trades.AntallPips) AS [Sum Av AntallPips] FROM trades GROUP BY trades.ID; The idea is to have a start number like 10000 and using the sum to sum antallpips. For example like this: 10000+The first number=Calc 1...
  19. H

    IIF statements in report trouble...

    I want to print out some text fields with some iif statements and calculations, but I get them print out many times. I will have the print out only once. You can see it in the picture attachment. Please help me on that:)
  20. H

    Using IIF in text field in report

    Hi! I need some help on If statements... =IIf([GevinstTap]=True;Sum([AntallPips])) GevinstTap is a true/false field and AntallPips is a number field. I want to calculate the Sum of all fields who are True. Can someone help me? I know it is a simple thing..but Herbertioz
Back
Top Bottom