The sqltext function should convert a string "abc'def" into "'abc' & chr(39) & 'def'", that is, adding a ' to the beginning and the end after substituting ' and other dangerous characters that may be in the string. If you are sure that the textboxes will never contain such characters, you can omit this function.
What kind of database are you using? SQL Server? Oracle? PostgreSQL? Access? Other?
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert