Hi
I am trying to remove all spaces from a text field when a form is submitted so that the contents of the post code field match those in a database...
If drSet5c.Tables(0).Rows(0).Item("post_code") = UCase(Replace(tbPostcode.Text, " ","")) Then
response.write("Postcodes match")
Else
response.write("Postcodes DON'T match")
End If
So if the postcode in the database is AB12CD and the user types AB1 2CD the space is removed on submitting the form and the match statement shows. This is not working though.
It all works fine if the user does not include the space.
Any ideas?