Search results

  1. A

    Graph: Variable number of data series

    Thank you very much JHB! You are right, the cross table is completely unneccessary. :D
  2. A

    Graph: Variable number of data series

    Thank you very much for your help. Could you please explain that a little bit? :) How can I get 4 lines for 4 companies without a cross table?
  3. A

    Graph: Variable number of data series

    Hi, unfortuately I have a problem with the data source of a graph in an form. First of all: I am using Access 2013. I have a cross table like this: tbl_crosstable: C_Datum | Company A | Company XY ----------------------------------- 2011 500 100 2012 600 300 2013 700 200 If...
  4. A

    2nd run of a function caluclates wrong results

    I found a solution: i add: , Optional ByVal blnReset As Boolean = False If blnReset Then varFirmennameAlt = Null varWertAlt = Null Exit Function End If Sub VariableClear() Progress Null, Null, True End Sub Thank you one more time for your support! :)
  5. A

    2nd run of a function caluclates wrong results

    The code will be called from a query.
  6. A

    2nd run of a function caluclates wrong results

    Hmmm... I defined varCompanyOld as public variable and cleared it with an extra sub. Option Compare Database Public varFirmennameAlt As Variant ..... Public Sub Variable_clear() varCompanyOld = "" End Sub But it is no solution, too. And if I click into a field in the query, than appears a...
  7. A

    2nd run of a function caluclates wrong results

    If I compact/compress the database, than I get again the right results for one time. But I think this isnt a good solution :D
  8. A

    2nd run of a function caluclates wrong results

    I have changed in: Public Function Progress(ByVal varCompany As Variant _ , ByVal varPercent As Variant) As Variant Dim varCompanyOld As Variant Dim varValueOld As Variant Dim Value As Variant If varCompany & vbNullString = varCompanyOld Then ...
  9. A

    2nd run of a function caluclates wrong results

    Yes. And I think I need the static variables, because the function will be called for each datapoint and there I need the values of the last datpoint. Only at the end of the whole query, the static variables should be cleared. I didnt find a way how I can do this.
  10. A

    2nd run of a function caluclates wrong results

    I dont know what is more suitable in this situation. I found a code that uses vbNullChar and so I build my code with vbNullChar, too.
  11. A

    2nd run of a function caluclates wrong results

    Hey guys, i am using the following function in a query: Public Function Progress(ByVal varCompany As Variant _ , ByVal varPercent As Variant) As Variant Static varCompanyOld As Variant Static varValueOld As Variant Dim Value As Variant If varCompany &...
  12. A

    Continuous performance calculation

    No, this problem is fixed. This performance calculation is quite different.
  13. A

    Continuous performance calculation

    Hello, maybe I can not not see the forest for the trees ... or it is realy difficult. I have a table like: -> tblPerformance P_ID | P_Date | Performance ------------------------------ 1 | 01.01.2010 | 1,03 2 | 02.01.2010 | 1,05 3 | 04.01.2010 | 0,98 4 | 05.01.2010 |...
  14. A

    Compare the last two datapoints with 1

    I made a mistake :banghead:, now it works significant faster. Nevertheless, I am very interested to calculate tasks of this type in VBA. :D Do you know how it works?
  15. A

    Compare the last two datapoints with 1

    I think I got it. But it is very slow. The functions I have for e.g. the calculation of a moving average works much faster. Isnt it possible to creat a function in this case, too? I would do it by myself, but I dont know how I can caluclate with different rows. Maybe someone has an example...
  16. A

    Compare the last two datapoints with 1

    Ok, thank you very much. I will try it :D
  17. A

    Compare the last two datapoints with 1

    Yes it the index. It is sorted by test_Symbol and test_date. The ID will be created after this sorting: Public Function ID_Laufende_Nummer() DBEngine.SetOption dbMaxLocksPerFile, 300000 Dim sql As String Dim RS As DAO.Recordset Dim i As Long i = 1 sql = "SELECT * FROM tblTest...
  18. A

    Compare the last two datapoints with 1

    No, like this: test_id | test_Name | test_Date | test_value ------------------------------------ 1 | Company A | 01.01.2010 | 0,90 2 | Company A | 02.01.2010 | 0,95 3 | Company A | 03.01.2010 | 1,10 4 | Company A | 05.01.2010 | 1,05 5 | Company B | 01.01.2010 |...
  19. A

    Compare the last two datapoints with 1

    There are much more companies, this is only a simple example. One ID for one day. And only the IDs of one company should be the basis for the calculation. E.g. dont compare on ID 5 the ID 4 and 3, because ID 5 is Company 5 and 4 & 3 are Company A. I tried to write what should checked in each...
  20. A

    Compare the last two datapoints with 1

    test_id | test_Name | test_Date | test_value ------------------------------------ 1 | Company A | 01.01.2010 | 0,90 2 | Company A | 02.01.2010 | 0,95 3 | Company A | 03.01.2010 | 1,10 4 | Company A | 05.01.2010 | 1,05 5 | Company B | 01.01.2010 | 0,9 6 |...
Top Bottom