Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Function stopped working (MSACCESS 2003)

    I have a form that has a textfield used as a memo. The text entered can contain any words, however on its exit it checks to see if any words typed in are Keywords. It runs a function that checks the keywords in a table, and if found amends the textbox to uppercase on the found keyword. This was all working okay, but now it has stopped working. Would appreciate any help, I thought this was dead and buried. Regards
    Attached Files Attached Files

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Function stopped working (MSACCESS 2003)

    It works OK for me. Keep in mind that keywords will only be changed to upper case if there is a space before and after them.
    Does the problem persist after closing and reopening the database? After restarting your PC?

    PS I'd use the After Update event of the Comments text box instead of the On Exit event.

  4. #3
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function stopped working (MSACCESS 2003)

    Thanks Hans. I put it on a CD and ran it on my main PC, again does not work?
    It goes off into the function, but Txt ends up being thesame as typed in ie lower case. Just when I did'nt need this. Thought it might have been Access on my laptop not working but doing it on my standalone pc makes it a problem.. Oh well thanks for your help, problems in my court. Regards

  5. #4
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function stopped working (MSACCESS 2003)

    Hans, I just took a sedative and read slowly what you had said - needs a space before and after. I was adding a word at the end of my text and that was the reason for failure. It works thanks to your help, however I now need to see how if a word was added like I did at the end then how to overcome it being bypassed. Regards

  6. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Function stopped working (MSACCESS 2003)

    If you omit the space before and after the keyword, you'll run into the old problem that some keywords could also be part of longer words, e.g. hitman would become HITman.

  7. #6
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function stopped working (MSACCESS 2003)

    Thanks Hans. You gave me an idea which works. Before the function gets called I changed the code to Me.Comments = Me.Comments & " " This takes care if someone adds a keyword at the end. Best regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •