I have a simple form with a text box and a submit button. Once submitted the value in the text box is checked against a table, if there is a match it adds it to another table.
The problem is this program is set up to allow scanning of barcodes, but the ID is for ex. A000123, and it works if I enter 000123 or 123, but the "A" gives me a "no value given for one or more required paramenters" error.
I have tried doing a simple replace:
That does not solve the problem. I will also post the SQL call:
Any help would be greatly appreciated. If this is possible, the idx alpha is not always "A" it can be any letter, so if there is a solution to replace all letters with nothing that would be even better.
Thanks
The problem is this program is set up to allow scanning of barcodes, but the ID is for ex. A000123, and it works if I enter 000123 or 123, but the "A" gives me a "no value given for one or more required paramenters" error.
I have tried doing a simple replace:
Code:
Dim idx As Integer
idx = Me.txtAddPrep.Text
idx = Replace(idx, "A", "")
That does not solve the problem. I will also post the SQL call:
Code:
strSQL = "Select * FROM tablename WHERE id = " & idx
Any help would be greatly appreciated. If this is possible, the idx alpha is not always "A" it can be any letter, so if there is a solution to replace all letters with nothing that would be even better.
Thanks