none
LCase is not converting RRS feed

  • Question

  • My LCase functions is not converting the uppercase text I enter.

    LCase (strPassword)/LCase (txtPassword.Value).

    Thursday, March 30, 2017 11:56 AM

Answers

All replies

  • What happens when you insert a breakpoint and perform a Debug.Print in the immediate window?  What values are returned?

    I also do not get you code, is that in fact your VBA code?  Could you post the entire procedure so we can review it.

     

    When you say "not converting the uppercase text I enter", you are wanting to change the value entered by the user into lowercase?  If so, the code would be something like:

    Me.txtPassword = LCase(Me.txtPassword)

     

    If you are trying to check passwords, then you may find http://www.utteraccess.com/forum/index.php?showtopic=2025600 or https://answers.microsoft.com/en-us/msoffice/forum/msoffice_access-mso_other/creating-a-password-routine/7bc77f53-9e01-4425-a329-6dea76582752 useful for the comparison part of your code.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net




    Thursday, March 30, 2017 12:26 PM
  • Set a Debug breakpoint on the line of code where LCase is called. Run your code and when it stops at the breakpoint step past that line and check the resulting value. You can use the Immediate/Debug Window to check the value using either Debug.Print or typing ?strPassword followed by Enter key. You can also right click on a variable and use Add Watch and then use the Quick Watch window (Debug...Quick Watch) to see when it changes.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Thursday, March 30, 2017 1:05 PM
  • When you say "not converting the uppercase text I enter", you are wanting to change the value entered by the user into lowercase?  If so, the code would be something like:

    Me.txtPassword = LCase(Me.txtPassword)
          It worked.
    • Marked as answer by MarcusKgosi Thursday, March 30, 2017 1:35 PM
    Thursday, March 30, 2017 1:34 PM