none
VBA in excel RRS feed

All replies

  • Congratulations!!! 

    You got type mismatch error!!!

    Is it your first? I didn't get one for very long time and think that old one already is not useful... 


    Sincerely, Highly skilled coding monkey.

    Sunday, September 16, 2018 8:08 AM
  • Posting your code would help.

    The following generic explanation may help.

    in Access DB, when we use select Query, we have to use TN_ID = " & UsernameTextBox.Text " instead of TN_ID = '" & UsernameTextBox.Text "' for number data type.
    Because '" & any-value "' is used for String value and " & any-value " used for integer or number value from database. (') is used for Sting data. For number we should remove it like this " & any-value "


    John


    Sunday, September 16, 2018 9:40 AM
  • Hi John,

    perhaps you can use a command like this:

    IIf(IsNumeric(UsernameTextBox), "", """") & UsernameTextBox & IIf(IsNumeric(UsernameTextBox), "", """")

    regards Volker

    Tuesday, September 18, 2018 3:41 PM
  • Alphanumeric data is also known as a "string". Ensure the variable that you are retrieving the data in to is dimensioned to accept a string.

    EXAMPLE:

    Dim alphanumericdata as String

    Tuesday, September 18, 2018 5:02 PM