I have a database with a lot of text box fields for the user to enter data into. Through random keyboard mashing, I found out that if a user types something into a text box and it contains a semi-colon (";") anywhere in the string, then anything after that semi-colon disappears. Well I'm assuming it disappears and doesn't try and add it somewhere else.
I know in VBA that if you use the .AddItem functionality of a listbox and then follow it with x amount of variables, each separated with a semi-colon, then it adds them to each column of that listbox.
Is there anyway I can turn off the semi-colon functionality from a text box, or am I going to have to perform a check on every single text box in my form (which currently consists of at least 20 and rising)?
I've already written the function as:
Code:
Public Function ReplaceSemiColon(searchString As String) As String
If InStr(searchString, ";") > 0 Then searchString = Replace(searchString, ";", ":")
ReplaceSemiColon = searchString
End Function
Which works fine but I really want to avoid having to put this clause into every single text box/combo box that is currently available to the user.