Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

States in a form text box -smart access?

Status
Not open for further replies.

DougAtAvalon

Programmer
Jan 29, 2001
99
US
How come PA comes up like "Pa" but NJ comes up correctly with NJ after i type the abbreviation in the exit the field.

Anyone?
 
Have you tried Tools - AutoCorrect? You will be able to automatically correct two initial capitals, just like MS Word.
 
Actually it sounds like auto correct is your problem. If you're typing "PA" in all caps it thinks you're typing in the word "Pa" (like mom and pop) and auto correcting the capitalization for you. Since NJ isn't a real word it's not touching it.

Putting ">" in the format property will leave the state as all caps and fix your problem......

However, let offer some advice, I would think twice before setting up a textbox for the users to free type in a state. Instead set up a combo box containing all the states and let them choose from the list. This will prevent future typos in your database. (Users will type "HA" and "HI" for Hawaii and "MI" can stand for Mississippi, Minnesota, Michigan, Missouri or Maine in some people's heads.)

Another idea would be to only let the users type in the zip code and then auto-fill the city and state from a zip code lookup table if that data is available to you already. Maq B-)
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top