R
Rich
Hello,
I am building a small application that contains addresses. I have a table
with the names and 2 letter abbreviation of all 50 states. When a 2 letter
state abbrev. is entered, I want to verify it against the state table. I'm
not sure how to approach this.
Option 1. When this field gets the focus, user should enter the first
letter of the state. Those states that then match the condition are then
displayed in the drop down box. Question, should this field be a drop down
or combo box? (i.e. Enter the letter 'A' and execute the query:
"select state_abbrev from tblStates
where StateAbbrev is like value_entered"
So, if user enters "A", state abbreviations for every state that starts with
"A" should populate the field and the user can select the correct state
abbreviatoin.
If user enters a letter such as "Q" for which there is no state, a message
box could be displayed with appropriate error.
Option 2: When state field gets the focus, all 50 states appear in the box
and user can select the correct abbreviation. I guess this might be the
better option.
Can anyone help me with the code? Should the code execute when the box gets
the focus or when the users hits the drop down arrow?
TIA,
Rich
I am building a small application that contains addresses. I have a table
with the names and 2 letter abbreviation of all 50 states. When a 2 letter
state abbrev. is entered, I want to verify it against the state table. I'm
not sure how to approach this.
Option 1. When this field gets the focus, user should enter the first
letter of the state. Those states that then match the condition are then
displayed in the drop down box. Question, should this field be a drop down
or combo box? (i.e. Enter the letter 'A' and execute the query:
"select state_abbrev from tblStates
where StateAbbrev is like value_entered"
So, if user enters "A", state abbreviations for every state that starts with
"A" should populate the field and the user can select the correct state
abbreviatoin.
If user enters a letter such as "Q" for which there is no state, a message
box could be displayed with appropriate error.
Option 2: When state field gets the focus, all 50 states appear in the box
and user can select the correct abbreviation. I guess this might be the
better option.
Can anyone help me with the code? Should the code execute when the box gets
the focus or when the users hits the drop down arrow?
TIA,
Rich