Recent content by hughesje

  1. H

    Query criteria to pick range of date dependent on variable

    ok think I have it, it was a logic problem really, I am using : <=Nz(([TempVars]![tvcldate]),#31/12/2100#) using #31/12/2100# instead of "*", it would seems it was testing <= against "*", which errors, whereas the original function was using "*" to just return all records Thanks for your...
  2. H

    Query criteria to pick range of date dependent on variable

    Tempvars is not in the form itself, it is a variable set by the form, so that doesn't work, it needs to work that way as there are multiple users and the tempvars is user specific whilst the form value is not and one users change would effect the others.
  3. H

    Query criteria to pick range of date dependent on variable

    All records should show if no date is selected in the Nz I believe this is represented by the "*", this bit does seem to work fine with the original formula Like Nz(([TempVars]![tvcldate]),"*") but off course without the date range when a date is selected. Was thinking perhaps could do some...
  4. H

    Query criteria to pick range of date dependent on variable

    Yes I tried this first, it works where a date is selected but when left blank i get the error message per attached
  5. H

    Query criteria to pick range of date dependent on variable

    That works where a variable is selected but causes an error (or returns no records) where variable is NULL.
  6. H

    Query criteria to pick range of date dependent on variable

    Hello, I am trying to write a query from a main table which will show records which have a date of less than or equal to a Variable (tempvar), however the variable (selected from a form) may be left blank in which case all records should be shown. I have successfully used the following but...
  7. H

    Question Due date - Working Days

    Many thanks Sparks80, I have been searching for a simple way to do this and this was great, one thing for me (being a basic user!) was an 'Object' error so my slightly amended version is: Public Function WorkingDay(StartDate As Date, NumberOfDays As Integer) As Date Dim xl As Object Set...
Back
Top Bottom