Recent content by raskew

  1. R

    expression in default value

    Hi - You need to be using an immediate if (iif). Here's an example from the debug (immediate) window: x = "john" ? iif(x ="john", 8,9) 8 x = "joe" ? iif(x ="john", 8,9) 9 HTH - Bob
  2. R

    Query - Start Date End Date For Report

    Hi - This may simply be a typo, but in your explanation you list: ...but in your code it's: Note it's CQStartDate vs. CQdatestart and CQEndDate vs. CQdateend. Hope that may help - Bob
  3. R

    Short Name from Full Name

    Hi - Here's a function that will recreate a short-name, regardless of the number of middle names: '************************************************ Examples: Best wishes - Bob
  4. R

    Short Name from Full Name

    Hi - This can be done using a full-name field. Try playing with this: Here's a version of the instrrev() function: If, perchance, names are stored as LastName, FirstName MiddleName (a common practice in some environments) you can do this: Best wishes - Bob
  5. R

    Days left in the year from a date

    Hi - Try playing with this: Best wishes - Bob
  6. R

    Assigning postcodes to regions

    Hi - If Postcodes are similar to your example, and you are seeking to extract the portion to the left of the space, try playing with this: HTH - Bob
  7. R

    Question Extracting part of a date

    Hi - Try something like: x = now() ? format(x, "mmm") Feb HTH - Bob
  8. R

    Get dates based on the day

    Hi - Assuming you are working with Sunday = 1 thru Saturday = 7 HTH - Bob
  9. R

    Add chr in string

    Hi - Try this (example from the debug/immediate window): -or- HTH - Bob
  10. R

    If Statement for a Query Using SUM

    Hi - Check-out the nz function in the help file. It should give you what you need. Best Wishes - Bob
  11. R

    Extract numbers from text

    Hi - Try copying the following to a module, then call as shown: Function SaveNumer2(ByVal pStr As String) As Long '******************************************* 'Purpose: Removes alpha and non-numeric characters from ' a string 'Coded by: raskew 'Calls: Function IsNumeric()...
  12. R

    "Like" condition query not returning the correct values

    Hi - You might try playing with this (from the debug window): '************************* x = "thisisatest.com" y = "thisisatest.abc" ? left(x, instr(1, x, ".com")-1) thisisatest ? left(y, instr(1, y, ".abc")-1) thisisatest '************************* HTH - Bob
  13. R

    Removing Spaces in a text field

    Hi - Here's another function you may want to check out. It will remove specified characters, as well as spaces. Function despace(ByVal pstr As String, pItem As String) As String '******************************************* 'Purpose: Removes characters from a string 'Coded by: raskew...
  14. R

    Tricky Recursive Function

    Hi - I posted this ages ago. You might give it a try to see if it's close to what you're after. Best wishes - Bob
  15. R

    Call to goto specified module and open to specified function/sub

    Hi - Thanks much for that! I also answered my own question when I found where I'd used the OpenModule method of the Microsoft Access DoCmd object For example, this line of code: docmd.OpenModule "Utility Functions", "DeleteTableTest3" would display the DeleteTableTest3 sub in the Utility...
Back
Top Bottom