Hi everyone... Quick question for you guys... A company created an application for us that fills in a MS 97 Database. I had to create a VB6 component that would use this database to display certain information. My only problem is coming when I try to output the Zip Code in 00000-0000 format. The company formatted the field as text with a 20 character max. If a user doesn't enter the 4 digit extension, the info in the database is saved as only 5 characters, not 9.
Example 1: If I entered 12345- as the users Zip, it would show up as 12345.
Example 2: If I entered 12345-6789, it would show up as 123456789.
In my VB App, I started off by using the format(zip,"00000-0000"
. This is fine for Ex. 2, but shows up as 00001-2345 for Ex. 1. I need to use left justification always. So I tried to use format(zip,"!00000-0000"
. When I ran this, it always showed zeroes, 00000-0000. Any ideas would be greatly appreciated. Thanks.
Doug
Example 1: If I entered 12345- as the users Zip, it would show up as 12345.
Example 2: If I entered 12345-6789, it would show up as 123456789.
In my VB App, I started off by using the format(zip,"00000-0000"
Doug