Recent content by sargon

  1. S

    Dlookup for previous record

    I took into account your advices and I succeeded in this way: 1) I create ID (autonumbering): ID: DCount("Start_date";"Query1";"Query1.Start_Date < #" & Format$([Query1].[Start_Date];"yyyy-mm-dd") & "#")+1 2) xv: IIf([Rate] Is Nul;DLookUp("Rate";"Query2";"[ID]=" & [ID]-1);[Rate]), but this...
  2. S

    Dlookup for previous record

    I think the only sort could be SD (date format)... Expr1: IIf([Rate] Is Nul;DLookUp("Rate";"Rate";"SD < #" & Format$([SD];"dd.mm.yyyy") & "#");[Rate])
  3. S

    Dlookup for previous record

    I try to fill the empty records whit the last record that in not null. For this I use this formula: Expr1: IIf([Rate] Is Null;DLookUp("Rate";"tblRate");[Rate]) But at the third record, it fills not from second record (0.00), but from first (0.20)
  4. S

    Public function from next record

    It is perfect! Thank you!
  5. S

    Public function from next record

    Something is not working...
  6. S

    Public function from next record

    And If I want to create a Public Function? Public Function fc_p() Dim db As DAO.Database Dim rs As DAO.Recordset Set db = CurrentDb() Set rs = db.OpenRecordset("YourTableName") Dim strSQL As String strSQL = "Select x_date, Nz(DMin("x_date", "YourTableName", "x_date > #" & Format$(x_date...
  7. S

    Public function from next record

    I never used VBA before, but I need to create a public function (fc_P) that read all the record from one field (x_date) and after that to create a new field that has in the previous record x_date - 1 (last record should be Now()) x_date 01/01/2022 03/05/2022 08/07/2022 and to generate fc_P...
  8. S

    Penalties applied according to a table

    Thank you! It is a big help. It can be done without table Computed? All the data are allready in the other three tables (Company, Rate, Payment)...
  9. S

    Penalties applied according to a table

    I don't think so, because nothing changed in that interval, there was no change in the rate and no payment. E_data should be descending and in this example, unique. At 222 line E_data should be 10/01/2024.
  10. S

    Penalties applied according to a table

    My database and excel test... I cannot arrange the order of the L_Date correctly
  11. S

    Penalties applied according to a table

    I have three tables: 1. tblRate - (in accordance with the law, penalty rates are applied at certain intervals) - rate_ID - Start_Date (as date) - End_Date (as date) - penalty_rate (%) 2. tblCompany - (companies that have debts) - Company_ID - Company_Name - Debt_Start (as date) - Debt (money)...
  12. S

    Calculate Days Between Records

    You are wright. Now it is working
  13. S

    Calculate Days Between Records

    arnelgp, thank you, but it still had errors
  14. S

    Calculate Days Between Records

    Here is an example
  15. S

    Calculate Days Between Records

    Calendar days as total days (including holidays)
Back
Top Bottom