Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. raskew

    My Access Query for Median seems not working for even records

    Hi - Try playing with this: Public Function MedianF(pTable As String, pfield As String) As Single '******************************************* 'Purpose: Return median value from a recordset 'Coded by: raskew 'Inputs: ? medianF("Orders", "Freight") <enter. 'Output: 41.36 (may vary...
  2. raskew

    HOW TO EXTRACT TIME FROM A DATE STAMP.

    Hi - Applying formatting to a date/time returns a string, which may not be helpful if you intend to use any of the built-in date time functions. Look at this MSKB article to see how Access stores date/time http://support.microsoft.com/kb/q130514/ Consider the TimeValue() function, e.g. from...
  3. raskew

    Date conversion

    What exactly does that mean? Bob
  4. raskew

    Date conversion

    Hi - Regardless of formatting, Access stores dates in a date/time field as doubles representing the number of days since 30-Dec-1899. You can test this from the debug (immediate) window: Today is 28-Sep-2006 ? cdbl(date()) 38988 Attempting to store 290906 in a data/time data type field will...
  5. raskew

    between specific dates

    And if the criteria changes you do what?? Let's go back in and rewrite the code. Splendid! Why are you using Now() rather than Date(). Is there a time involved here. Can't find any reference to one. Lookup the Date() and Now() functions to see the differences. Bob
  6. raskew

    between specific dates

    Hi - To make this dynamic so that you don't have to go in and change the coding each year, place this as the criteria for your date field: between [enter start date] and dateadd("yyyy", 1, [enter start date]) -1 HTH - Bob
  7. raskew

    Financial Quarter

    Hi - There are many instances when a fiscal year does not start on 1 Jan. Try the following which allows the user to specify the FY start date. Function fGetFYQtr(FYStart As Date, pDate As Date) As Integer 'To call: from debug (immediate) window '? fGetFYQtr(#7/1/06#...
  8. raskew

    Removing spaces from a cell

    Hey rjoubert- That's all well and good, but it does nothing if you're using A97. If we can't come up with a universal solution, I'll lay one on you, using 'roll your own' substitutes for each of the built-in A97+ functions. Abaldwin's solution sounds great. Just need a littlr guidance on...
  9. raskew

    Removing spaces from a cell

    It sounds wonderful. Let me show my ignorance here. VBE6.dll exists on my system. It doesn't show up under References. What to do to register it? Best wishes, Bob
  10. raskew

    Removing spaces from a cell

    ... and the Join() function. Bob
  11. raskew

    Removing spaces from a cell

    Golom - A97 also lacks the Split() function. Bob
  12. raskew

    Between Criteria

    Hi - Copy/paste this to the criteria cell of your date field: Between Date() And Date()-13 The Now() function includes both date and time. Better to stick with the Date() function which provides just what it says. HTH - Bob
  13. raskew

    Adding Time

    Remou - The poster's question was not about time as in date/time data type, but rather elapsed time, e.g. I worked 12 hours and 5 minutes yesterday and 10 hours and 25 minutes today for a total of 22 hours and 30 minutes. I'm confused as to how the FAQ relates. Bob
  14. raskew

    Adding Time

    Hi - Keep in mind that you're dealing with periods of elapsed time which doesn't follow the same rules as actual times in data/time data type. Give this a try: Function ElapTimeAdd(pfirst As String, pnext As String) As String '*********************************************** 're...
  15. raskew

    calculating age from ms sql table

    It may seem that the DateDiff() function should return Age based on Date of Birth (DOB) and a user-specified date. However, there's a problem with that solution since the DateDiff("yyyy"....) merely subtracts one year from another. To accurately return age in years,we must know whether the...
  16. raskew

    help-----iif function

    Hi- It sounds as if this calls for a Boolean vs. text field. The test for Graduated is either true (-1) or false (0). There's no place for Null. Displaying a checkbox bound to a boolean field, the value is either -1 (Checkbox checked) or 0 (Checkbox not checked). Consider adding a new...
  17. raskew

    leading zeroes

    Hi - Try incorporating the Str() function. Example: x = 99 y = format(str(x), "000") ? y 099 Bob
  18. raskew

    Automating find/replace

    Hi - Try this in a test table. Don't try it with your working table until you're entirely satisfied with the results. 1) Create a query, pulling down all fields that may contain an undesired word, phase or character. 2) Copy/paste the following code to a new module. 3) Change the Select...
  19. raskew

    Comparison of Time Values in SELECT statements

    Pete- The dateadd() function should give you what you're after. From the debug window: appttime = #10:30# warntime = dateadd("n", -90, appttime) ? warntime 9:00:00 AM HTH - Bob
  20. raskew

    find what forms and reports use a field from a given table

    V-Tools, a freeware add-in appears to --in its Deep Search mode-- go down to the level you're looking for. Tried a test and it provided every reference to OrderID in tables, queries, reports, forms. You can download it at http://www.skrol29.com/us/developpements.php HTH - Bob

Part and Inventory Search

Back
Top