I have a database with a zipcode field
some have the full zip+4 like 90036-1234
some only have 90036-
is there a way to create a routine to strip out that - when there arent numbers after it?
thanks for the link. I dont get how to use the replace with what i want to do
since the numbers are all different
I'd like to be able to do a wildcard for first 5 digits the 6 character would be - i would also need to determine if there are any characters after the - (four more numbers) and exclude those
and those without the 4 digits after the - strip out the -
yes:
I have a table with a list of zip codes that look like either of the following:
33401-1234
90036-2353
33407-
48910-
I would like to be able to remove the - on the entries like 33407 and 48910( that don't have four characters/numbers after the - like the first two above)
If you simply want to remove a trailing "-" then you could use something like;
Code:
If [URL="http://www.techonthenet.com/access/functions/string/right.php"]Right[/URL](Me.YourTextField, 1) = "-" Then
Replace(Me.YourTextField, "-", "")
End If
Is there a way to have it check to see if the space after the - is blank?
If it is then I know that record doesn't have the additional 4 digits (that need to stay)
and the - can be removed?