Recent content by mresann

  1. mresann

    Move Item in Listbox Function

    Fair enough. In fact, the module was created with the idea that others can follow the logic of the code and how it integrates with what they can accomplish in their own projects, which is why it is heavily commented as well. In more commercially distributed applications, I always break down my...
  2. mresann

    Move Item in Listbox Function

    A common occurrence in working with Access interface forms is to be able to move a Listbox item up or down a list, sometimes to the top or bottom of the list. The programming for such a relatively benign function is involved. The Listbox must use a Row Source Type of Value/List with delimiters...
  3. mresann

    About UpperCase

    You are probably right. I am only used to the English alphabet, which is but a subset of the entire Latin script that comprises the characters of languages originating from Western Europe, along with the Cyrillic script of eastern Europe.A very comprehensive summary on Wikipedia for the Latin...
  4. mresann

    About UpperCase

    Yo, peeps. Am I missing something? How about using the StrConv function? Specifically, strExample = StrConv("ÿ",vbUpperCase) ...would assign "Ÿ" to strExample This function can do a whole slew of conversions, including upper case, lower case, and proper case characters for the entire unicode...
  5. mresann

    Is there a cleaner way to repeat this code?

    Note: The original answer is "no." Each control must be programmed with code to call the function, or process the statement, on its own DoubleClick event. As other posters have mentioned, the code itself can be simplified and accessed through its own subroutine, but each control has to be...
  6. mresann

    Obtain positions of text character string from text block

    This is a simple but handy function that allows you to obtain the positions of characters within a text block. Say you have a line of text, or block of text, as follows: An apple a day keeps the doctor away. Now you would like to find the all the character positions of the letter “a” within...
  7. mresann

    Dlookup Type Mismatch Error

    You may wish to put "Solved" in the title as well.
  8. mresann

    Refresh listbox in database 1 on the close event of database 2

    Insert this statement at the end of the procedure that closes the external database. DoEvents Me.Listbox_Name.Requery ...where Listbox_Name is the name of our listbox control. NOTE: If you have other calculations on the form, you may wish to precede the listbox query statement with a form...
  9. mresann

    Extract Text from Text Block

    In many cases, I’ve had the need to extract text from text blocks, such as HTML source pages, in a quick but highly comprehensive manner. The text is identified by providing the string for the text immediately to the left of the desired text, as well as providing the string for the text...
  10. mresann

    number to ordinal list (1st, 2nd, 3rd...)

    Here is a much simpler one-line code (wrapped for clarity). The variable "lngNumber" is any whole number. The Switch function works somewhat like Select Case function, in which expressions are evaluated in order, the first one that produces a True statement (or non-zero result) provides for the...
  11. mresann

    Automate processing of Western Names

    Perhaps the most fundamental reason for using a database is to process names. Specifically, a process that can automatically parse a name into its constituent name parts and provide a method in which names can be populated into their proper places is a great time-saver. For instance, if you...
  12. mresann

    Email Parsing (vb code to find ASCII text)

    Sorry, deaf...I just saw your thread for the first time. Are you using Access 97? If it is A2K or greater, you can use the Split function. The split function creates an array variable (use variant for ease of use) that separates your text string into different elements. In your case, if you...
  13. mresann

    Find Top n in a table

    You would probably need to use a Top N query with a descending sort order in the pertinent field. For instance, if you have a table, Mytable, with fields called nameID, name, and salary, then you would create the following query to find the records with the top salaries. "SELECT TOP 3 * FROM...
  14. mresann

    seperating text

    Yes, there are some string functions to use. You can use this technique directly in a query or in a module using VBA. I'll do the VBA here. strFirstName="Johhny" strLastName="Goetz" strEmailName = Left(strFirstName,1) & strLastName & "" This returns "". Check...
  15. mresann

    Help with Business Days

    Try this: DateDiff("d", MyEarlierDate, MyLaterDate) + 1 NOTE: if the days are the same, then the answer will be 1.
Top Bottom