Search results

  1. R

    7days of seconds into hh:nn:ss

    Hi - Give this a try: x = 114613 ? Format(x \ 3600, "00") & ":" & Format((x Mod 3600) \ 60, "00") & ":" & Format(x Mod 60, "00") 31:50:13 HTH - Bob
  2. R

    Dates....

    And to add to Paul's response: Check out the "Q" (quarters) option to the DateDiff() function. Best wishes - Bob
  3. R

    Question Set date to this coming friday (Task form)

    Hi - This should work for any weekday. ? dateadd("d", -weekday(date())+6 , date()) To produce the following Friday ? dateadd("d", -weekday(date())+6 + iif(weekday(date())= 7, 6, 0) , date()) HTH - Bob
  4. R

    Dynamically Build Query

    Hi - Checkout this post. Bob
  5. R

    Help on searching using a query

    Hi - Take a look at the application at Post #7 of this thread. It allows the operator to search (anywhere within field) on keystroke by keystroke basis. With each keystroke, the app drills down to possibly applicable records. Bob
  6. R

    Quick Datepart ?

    Hi - Here's a function I've had laying around for a while - Public Function RtnDayNum(pstrDayName As String) As Integer '******************************************* 'Purpose: Returns day number (1 - 7) ' when provided a complete or partial ' Day name. 'Coded by: raskew...
  7. R

    Need help with query and new year

    Hi - Think you are creating an unnecessary monster. Personally, I have never understood the desire to use the 'julian date', particularly with all the date-related functions available in Access. I'm curious as to your definition of 'julian date'. If you did a Google on the term, you'd find it...
  8. R

    Select Case statement, question about inclusive

    Hi David - Did you take a look at the Switch() function in the previous post, e.g. ? score2grade(332.2) 3 ? score2grade(332.205) 2 ? score2grade(332.21) 2 I agree with your assesment of a Null value. I fought with that for more than a few minutes before concluding that it wasn't...
  9. R

    Select Case statement, question about inclusive

    Hi - Try playing with this: Public Function Score2Grade(dScore As Double) As Double Score2Grade = Switch(dScore < 238.2, 5, dScore <= 307.81, 4, dScore <= 332.2, 3, dScore <= 380, 2, dScore > 380, 1, True, 0) End Function To call from the debug (immediate) window: ? score2grade(332.3)...
  10. R

    Query from the table whose two fields are related to a single field of a table

    Re: Lovers Hug with Two Hands Perhaps if you posted subject titles that relate to the MS Access problem, you might get some responses. Bob
  11. R

    retrieve the Format Setting of a Field

    Re: Not Everyone look for Soul inside. Sometimes Face is Enough. Perhaps if you posted subject titles that relate to the MS Access problem, you might get some responses. Bob
  12. R

    Text to Date

    Perhaps: x = "0921679 V301239 E060310 97,6%" y = mid(x, instrrev(x, " ")-6, 6) ? y 060310 z = dateserial(right(y,2), Left(y, 2), mid(y, 3,2)) ? z 6/3/2010 Bob
  13. R

    Query previous weekday

    Hi - Where Sunday =1 thru Saturday = 7 ? date() 1/18/2010 ? date() - IIf(WeekDay(date()) < 3, 1 + WeekDay(date()), 1) 1/15/2010 HTH - Bob
  14. R

    Crosstab query.... I think

    Dave - You're absolutely correct -- the Partition() function is the way to go, ...provided you have even spacing between the various segments. Given the OP's problem, Partition() won't cut it unless you modify the segments, thus returning results that the OP doesn't want/need. Thus, the...
  15. R

    Crosstab query.... I think

    Hi - Try this, substituting table/field names as necessary: TRANSFORM nz(Count(Switch([MaxLen]<8,"A",[MaxLen]<10,"B",[MaxLen]<13,"C",True,"D")),0) AS Cat SELECT Table2.Site FROM Table2 GROUP BY Table2.Site PIVOT Switch([MaxLen]<8,"<8",[MaxLen]<10,"<10",[MaxLen]<13,"<13",True,"<15")...
  16. R

    Query dates before last week not working

    Hi - NOTE: In each of the following examples I've used the format() function to display the resulting date in 'long date' format. This was done only to make the examples more readable. In actual practice I don't see a purpose for this. ? format(date(), "long date") Thursday, January 14, 2010...
  17. R

    Question Formula for 'Week Starting Date'

    Hi - Try playing with this. It's based on Northwind's Orders table with records from 1995/1996. SELECT Orders.OrderID , Orders.CustomerID , Orders.OrderDate , Year([enter fystartdate mm/dd/yy]) & "/" & Year([enter fystartdate mm/dd/yy])+1 AS FiscalYear ...
  18. R

    Help with elapsed time function in form

    Just unzipped your ap. Haven't had time to get into it yet, but the one thing I note is that you've named your modules with the same name as the sub/function within. That is an absolute no-go. Go back and rename your modules Mod1, Mod2, Mod3. Incidentally, you don't need a separate module...
  19. R

    Help with elapsed time function in form

    Hi - Is it possible for you to post an example db? Bob
  20. R

    Help with elapsed time function in form

    Try changing the first line: Public Function DtDiff(sdate As Date, edate As Date, Optional pItems As String = "wdhns") As String to Public Function DtDiff(ByVal sdate As Date, ByVal edate As Date, Optional pItems As String = "wdhns") As String Do not place ## around your control names as you...
Back
Top Bottom