Search results

  1. E

    Solved Union Query Average Grouped

    This code works! Thanks
  2. E

    Solved Union Query Average Grouped

    I have a union query to, both tables have a date formatted as "yyyy mm" to group records by month, I need to combine the PaidTime from tblDuties and PaidTimeAnnualLeave from tblAnnualLeave as AveragePaidTime SELECT Format([DutyDate],"yyyy mm") AS YearMonth, Avg(tblDuties.PaidTime) AS...
  3. E

    &Variance Vs previous record

    How do I go about calculating the % variation based on the previous record E.g. below I would like on 2nd record to show 20% as the increase versus the previous value of 100, on the last record should be 8.33 increase from 120
  4. E

    Solved Union Query with Calculations

    I receive email notifications for any answer I get, the screenshot shows the email I received with "" As TOT, Then if I go to the thread it shows a different code which is strange. Thanks for the additional information!
  5. E

    Solved Union Query with Calculations

    Thanks for the solution. Something really weird, the email notification I received came with a difference code as per screenshot below, the code in the browser still shows Null As TOT vs the email showing "" As TOT
  6. E

    Solved Union Query with Calculations

    Still confused!!!! I changed the code to SELECT TransactionDate, PensionEmployee, PensionEmployer, TransactionType, FundName, Payments, UnitsTransaction, "" FROM tblPension UNION SELECT PayslipDate, [PensionEmployee], [PensionEmployer], Null As Col4, Null As Col5, Null As Col6, Null As Col7...
  7. E

    Solved Union Query with Calculations

    I have a Union Query which I want to add calculated field SELECT TransactionDate, PensionEmployee, PensionEmployer, TransactionType, FundName, Payments, UnitsTransaction, TOT FROM tblPension UNION SELECT PayslipDate, PensionEmployee, PensionEmployer, Null As Col4, Null As Col5, Null As Col6...
  8. E

    Copying records

    I am looking to develop further my DB project, I am currently tracking payslip data where I have 2 columns with amounts related to payments to a pension scheme, I would like to track transactions of the pension scheme in details and therefore I have additional transaction (e.g. purchase and...
  9. E

    Solved File Dialog window

    Thanks this did the trick!
  10. E

    Solved File Dialog window

    I have a code to add a file link to a txt box and another code to access this file, is all working perfectly and have a minor issue if I decide not to add the link and pres Cancel within the dialog window the errror is The code is: Private Sub CmdAddPayslip_Click() With...
  11. E

    Solved DLookup value display with a minus sign

    Thanks for the solution!
  12. E

    Solved DLookup value display with a minus sign

    I have the following code to auto fill a form when is loaded as it reads the latest correct values from a table Private Sub Form_Load() SalaryAnnual.DefaultValue = """" & DLookup("SalaryAnnual", "tblSalary") & """" SalaryBasicPay.DefaultValue = """" & DLookup("SalaryBasic", "tblSalary")...
  13. E

    Solved DSum multiple fields with criteria

    Thanks, I should have thought of pure maths rather than coding....:rolleyes:
  14. E

    Solved DSum multiple fields with criteria

    I have the below expression in the Control Source in a form which is working for the one field to sum =DSum("BasicPay","tblPayslip","[payslipDate]>=Forms!FrmPayslip![FYFrom] And [payslipDate]<= Forms!FrmPayslip!PayslipDate") As well as the sum of BasicPay I need to add other fields within the...
  15. E

    Dlookup on unbound text

    Thanks @GPGeorge @MajP @Gasman very informative, hopefully I will get it right next time :)
  16. E

    Dlookup on unbound text

    Thanks @arnelgp that worked and thanks @Gasman for the link which I found useful, I am just puzzled and confused with when to use (), [] or " " in the expression @arnelgp changed the expression to use "" and it works, @Gasman the link provided uses some examples with [] mostly. Would you be able...
  17. E

    Dlookup on unbound text

    I have a generic 'frmStatistics' not linked to a record source, I would like to display results from various queries as a purpose to overlook statistics. One query example is below The query returns a one line result, and I need to use the Avg calculated expressions (AvgOCR, AvgITSOR and...
  18. E

    Solved DLookup & Concatenate

    Thanks for this!!
  19. E

    Solved DLookup & Concatenate

    I need to concatenate "FirstName" and "Surname" from a table with a lookup on a form, I am stuck on how to use concatenate in the code. The code I have under the afterUpdate event for the textbox RefStaffN is: Me.FullName = DLookup("FirstName", "tblEmployee", "StaffN=" & Me!RefStaffN) This is...
  20. E

    Link on form to a match record

    @Gasman How would In go to have the DCount in the Current event as you suggest?
Back
Top Bottom