Search results

  1. R

    How to do a simple countdown for date?

    Hi - It would certainly sound like your [Date_Start] field is the problem. What is its' data type and format? Bob
  2. R

    How to do a simple countdown for date?

    Hi - What is it doing or not doing? I just tested it, copying the code from post #6, and it works as advertised. Try this from the debug window: ? DateDiffExclude3(date(), #7/13/11#, "17") When I test it, it returns 91 (today being 3/9/11). Please provide more info, including name of your...
  3. R

    How to do a simple countdown for date?

    Hi again - Try copying this to a module, then test. The example shown is using Date() = 3/6/11 '___________________________________________________________ Function DateDiffExclude3(pstartdte As Date, _ penddte As Date, _ pexclude As String)...
  4. R

    How to do a simple countdown for date?

    Hi -- Now() works in Access. if you need to include both date and time. Date() returns only the current date (no time). Example from the debug window: ? date() 3/6/2011 ? now() 3/6/2011 12:13:46 AM HTH - Bob
  5. R

    DateTime queries

    If you're still having problems, here are examples, from the debug window, that might simplify the situation: x = now() ? x 2/1/2011 7:52:01 PM ...as it's stored by Access ? cdbl(x) 40575.8277893519 ...using DateValue() function ? DateValue(x) 2/1/2011 HTH - Bob
  6. R

    difference between two times

    Hi - See if this might be helpful. To use, copy to a standard module and call as shown in the example. Public Function TimeFHNS(dteFrom As Date, dateTo As Date) As String 'Input: ? TimeFHNS(#07/20/2008 06:30:25 AM#, #07/21/2008 10:30:30 AM#) 'Output: 1 day 4 hours 0 minutes 5 seconds Dim i...
  7. R

    Calculate Business Days Through MS Access Events (VBA)

    The code appears to come from: http://www.access-programmers.co.uk/forums/showthread.php?t=133329&highlight=function+businessdays Bob
  8. R

    Print a list of used tables and populated fields

    Hi - Any chance you can post example table(s). I'm lazy and don't want to build this myself, even though your example is quite clear. Best wishes - Bob (SGM, USA Ret)
  9. R

    filter string question

    Hi - This approach might simplify your options: left(JobNumber,3) = '001' And ActivityDate Between #1/01/1950# And #6/30/2010# Best wishes - Bob
  10. R

    Randomly select a % of records run from a query

    Is it random 10% or top 10%? Come on - you can do it! Bob
  11. R

    Randomly select a % of records run from a query

    I'm confused. You're jumping around. First we have what you initially posted (see above) and then we're talking the top 10% (which obviously won't be all random). Which is it? Bob
  12. R

    Randomly select a % of records run from a query

    Hi - Trying copying the function at Post #3 to a standard module then, from the debug window, run the following 10 times. Here's an example: ? RandLotto2(1, 100, 10) 1 11 14 16 47 56 68 70 79 98 20 24 29 32 42 47 67 73 87 89 7 8 38 39 53 61 65 75 92 97 14 15 24 28 32 43 56 66 81 96 10 20...
  13. R

    Randomly select a % of records run from a query

    Hi - Give this a try. It was developed to randomly select lottery numbers, but should do the job for you. Public Function RandLotto2(Bottom As Integer, Top As Integer, _ Amount As Integer) As String '*******************************************...
  14. R

    Date Ranges still pulling all dates entered

    Hi - Try modifying statements like: DIQA.[Date of Audit])>=[StartDate]<[EndDate]+1 to: DIQA.[Date of Audit])>=[StartDate] and <[EndDate]+1 While I deeply respect Allen Browne's knowledge and solutions, I can't make the where statement, as published, work. In my tests the statement is...
  15. R

    Change text to date format

    Hi - Try playing with this from the debug (immediate) window: x = "60410" (5 digit text number) y = "120410" (6 digit text number) ? dateserial(right(x,2), left(x, len(x) -4), mid(x, len(x)-3, 2)) 6/4/2010 ? dateserial(right(y,2), left(y, len(y) -4), mid(y, len(y)-3, 2)) 12/4/2010 It...
  16. R

    Search Date/Time Field Using Date Only

    Hi - Lookup the DateValue() function, which will return only the date portion from a date/time field. For example: between DateValue([your d/t]) and DateValue([your d/t]) + 1 HTH - Bob
  17. R

    Find Duplicates - Transposed Numbers

    Hi - This little function will add up your individual digits: Public Function AddStr(x As Variant) As Integer Dim n As Integer Dim t As Integer For n = 1 To Len(x) If IsNumeric(Mid(x, n, 1)) Then t = t + Mid(x, n, 1) End If Next AddStr = t End Function From a...
  18. R

    IIf function

    Hi - The more conventional way of doing this would be a separate table (e.g. tblItemType) with two fields, AddressID & Address, linked to your main table via AddressID. Given the above, there'd be no need for either Iif() statements or Xor processes. Bob
  19. R

    Date()-1 excluding Weekends

    Hi - I got kind of lost on your formatting explanation. Provided your date fields are stored in date/time data format (not text), give this a try: Public Function fGetWorkdays2(pstart As Date, pend As Date) As Integer '************************************************ 'Purpose: Compute...
  20. R

    Bob Larson - Emulate Quicken

    Thanks for your response. Guess it's back to the drawing board. Best wishes - Bob
Back
Top Bottom