Search results

  1. M

    Sorting characters within a string

    Excellent, thanks Ajetrumpet & Cosmos, The quoted KB article & code worked in my scenario Thanks!!!!
  2. M

    Sorting characters within a string

    Hi ajetrumpet , I'm looking to build a "Srabble helper" that will return a list of words based on a user's input from they're letter's sorted a-z My current macro does the first "Bubble" while re-arranging the middle and last letters, but obviously needs a few parses before it's complete. Also...
  3. M

    Sorting characters within a string

    Hey there! I'm struggling at the moment to make a piece of VBA that will allow me "bubble sort" and re-arrange the internal characters within a string E.g. String "BAA" will become "AAB" Below is my feeble attempt at the VBA code for this Public Function sortwdaz(txtstring1 As String)...
  4. M

    Due Dates based Upon 2 fields

    No worries, happy to help
  5. M

    if query

    SampleID2: Iif([SampleID] is null,"EMPTY",IIf(Left([SampleID],1)<=4,"DOT","Non-DOT")) should do it!
  6. M

    Due Dates based Upon 2 fields

    If there's a field in there that determines whether it's due at the Start of the month, or middle of the month you can adjust: eomonth([Create Date])+1 to iif([DueInMth]="Start",Eomonth([Create Date])+1,eomonth([Create Date])+16 ) perhaps,
  7. M

    Multiple match conditions in a unrelated table

    How do I access the QBE view, is this the same as design? Can the fields be directly related as they'll never have an exact text match?
  8. M

    Now() but! always the 1st

    Public Shared Function GetBeginOfCurrentMonth(ByVal pDate As Date) As Date Return Date.Parse(pDate.Year.ToString & "/" & pDate.Month.ToString & "/01") End Function You can then use dtmReportDate = GetBeginOfCurrentMonth(Now()) or dtmReportDate = GetBeginOfCurrentMonth(date var)
  9. M

    Multiple match conditions in a unrelated table

    Hi All, My database has two tables: 1. Complete Address Data 2. Address conditions. Table 1. has verbose customer [address] data like 11 smith st, 14 Kent Rd etc. Table 2. has [std] address conditions, ST, RD, Street, Road etc. How can I query ALL records by field [address] in table 1 by...
  10. M

    Due Dates based Upon 2 fields

    EOMONTH inside Excel does this function, so but here is the Acess Equilivant Public Function EOMonth(InputDate As Date, Optional MonthsToAdd As Integer) ' Returns the date of the last day of month, a specified number of months ' following a given date. Dim TotalMonths As Integer Dim...
  11. M

    Same query takes 1 sec or 5 minutes!

    It depends on how many cache hits you get when you're querying data. To boost this, sometimes opening the source tables before hand helps!
  12. M

    Comparing lists of similar text strings

    With the help of Moniker he put me into this direction: Open up Tools => Macros => Visual Basic editor and paste into a new module. After pasting, use "Comparison: str_perc(S1Master,S1Submitted)" into your query Public Function str_Perc(txtString1 As String, txtString2 As String) As Single...
  13. M

    Comparing two Strings

    Cool, good to know about defining the output datatype, although I wouldn't say it was sluggish on 70k.
  14. M

    Comparing two Strings

    Yep, it worked. I've converted it to a public function below, but thanks heaps for the groundwork! Public Function str_Perc(txtString1 As String, txtString2 As String) Dim str1Len As Integer Dim str2Len As Integer Dim strLenDiff As Integer Dim ctr As Integer Dim...
  15. M

    Comparing two Strings

    Wow, this looks awesome, I'll plug it into my current DB and let you know how it goes! Cheers mate!
  16. M

    Comparing two Strings

    Hey Guys, Just wondering how I would go about comparing two strings, and spitting the results out a similarity percentage? E.G. (String 1) Postal Address: "11 John St" (String 2) Street Address: "11 John Street" (Output): 80%? Cheers
Back
Top Bottom