Search results

  1. T

    Median average doesn't change with any parameters

    not really. There are about 6 reports which works fine as it is but for the report that calculates median averages
  2. T

    Median average doesn't change with any parameters

    yes the report reopens at the moment I am not sure how to translate this SQL in AfterUpdate() WHERE (((qryEpisode.Date_Referred) Between [Forms]![frmReport]![startdate] And [Forms]![frmReport]![enddate])) into VBA though
  3. T

    Median average doesn't change with any parameters

    Code tagged - my apologies This is a query that creates a report. I know what I need to do but don;t know how to do it lol
  4. T

    Median average doesn't change with any parameters

    not sure how to code this though
  5. T

    Median average doesn't change with any parameters

    I think I can add 2 optional date variables but I need to reference the form text boxes where the start and end date are i.e. Between [Forms]![frmReport]![startdate] And [Forms]![frmReport]![enddate]))
  6. T

    Median average doesn't change with any parameters

    I have a module which creates a function to generate the median of a field 'ReferraltoTreatment' (measured in days) Function Median(tName As String, fldName As String) As Single Dim MedianDB As DAO.Database Dim ssMedian As DAO.Recordset Dim RCount As Integer, i As Integer, x As Double, y As...
  7. T

    First crack at VBA! error handling

    cheers!! vbainet
  8. T

    First crack at VBA! error handling

    i have done it!!!!!!!!!! If DCount("*", "qryTreatmentOptions") = 0 Then MsgBox "No records in query results!"
  9. T

    First crack at VBA! error handling

    apologies what vba code does one need to test if parameters of start and end date return zero records?
  10. T

    First crack at VBA! error handling

    sorry I don't get this. :confused:
  11. T

    First crack at VBA! error handling

    ah I see - you were referring to my use of Eval and providing an alternative? I don't think I can use DCount though as it won't count null values?
  12. T

    First crack at VBA! error handling

    this is the corss tab query that is the source of the report I am opening: PARAMETERS [Forms]![frmReport]![startdate] DateTime, [Forms]![frmReport]![enddate] DateTime; TRANSFORM Nz(Count(tblEpisode.EpisodeID),0) AS CountOfEpisodeID SELECT tblEpisode.Primary_Results...
  13. T

    First crack at VBA! error handling

    but i am testing to see if the cross tab query that underpins the report returns no records.
  14. T

    First crack at VBA! error handling

    bit stumped now, how do I execute the code to test if there are no record?
  15. T

    First crack at VBA! error handling

    cheers mate - got the eval from a sample on this site somewhere
  16. T

    First crack at VBA! error handling

    Hi there I am braving it and trying out VBA! I have a form which enters start and end dates and then opens a report I am trying to set up error handling which asks for the start and end date and then tells the user there isn't any matching records. At the moment if I deliberately enter...
  17. T

    Form level validation - date text box

    tried that out ken but that isn't what I need really. I tried dd/mm/yyy in input mask but now I cannot enter any dates at all. Also I need validation
  18. T

    Form level validation - date text box

    This is rather odd. I have a form that is not bound to a table but I need to validate it. I have entered in the text box properties under Validation rule: "dd/mm/yyyy" and vlaidation txt but even if if I follow the rule the validation text still appears!!
  19. T

    Median average

    works a treat plog thank you!
  20. T

    Median average

    I have set up a module using the Microsoft sample: Function Median(tName As String, fldName As String) As Single Dim MedianDB As DAO.Database Dim ssMedian As DAO.Recordset Dim RCount As Integer, i As Integer, x As Double, y As Double, _ OffSet As Integer Set MedianDB = CurrentDb()...
Back
Top Bottom