Field is to small

C

Carole

I have set up a form that includes a field for the state abbreviation. I
have this field set up to be two characters. However, whether I type it or
select it from the list, I get an error message stating that the data is to
big and to select from the list. Any suggestions on how to fix.

If I enter this information into my data sheet instead, it works and the
data will be populated correctly on the form too.
 
D

Dale Fye

Carole,

If you want to only use the two character state abbreviation, but want to
display the states name in the list, you should setup the rowsource for the
listbox to look something like:

SELECT [StateCD], [StateName]
FROM tblStates
ORDER BY [StateCD]

Then, set the # of columns in the list to 1, the Bound column to 1, and
change the combo boxes columnwidths property to 0", 1.5".

With the bound column set to 1, the value that will be stored in the
StateAbbr field of your table will be the [StateCD] value, not the name of
the state.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
C

Carole

To further clarify, both the state code and the form information reflect the
2 digit state abbreviation.
 
C

Carole

Thanks for the information, however, both fields are the 2 letter state
abbreviation.

Dale Fye said:
Carole,

If you want to only use the two character state abbreviation, but want to
display the states name in the list, you should setup the rowsource for the
listbox to look something like:

SELECT [StateCD], [StateName]
FROM tblStates
ORDER BY [StateCD]

Then, set the # of columns in the list to 1, the Bound column to 1, and
change the combo boxes columnwidths property to 0", 1.5".

With the bound column set to 1, the value that will be stored in the
StateAbbr field of your table will be the [StateCD] value, not the name of
the state.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



Carole said:
I have set up a form that includes a field for the state abbreviation. I
have this field set up to be two characters. However, whether I type it or
select it from the list, I get an error message stating that the data is to
big and to select from the list. Any suggestions on how to fix.

If I enter this information into my data sheet instead, it works and the
data will be populated correctly on the form too.
 
D

Dale Fye

Carole,

I assume that you have confirmed in the table design mode that both of these
fields are in fact text, 2 characters long. Since you indicate that entering
the 2 character codes directly into the datasheet works, that implies that
there is some setting on the form that is causing this problem.

Does your form have a textbox or a combo box that is bound to the state
abbreviation field, or both?

What (if anything) do you have in the Input Mask, Validation Rule, and
Validation Text properties of this/these control(s)?

If a textbox, what do you have in the EnterKeyBehavior property (Other tab)?

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
J

John W. Vinson

I have set up a form that includes a field for the state abbreviation. I
have this field set up to be two characters. However, whether I type it or
select it from the list, I get an error message stating that the data is to
big and to select from the list. Any suggestions on how to fix.

If I enter this information into my data sheet instead, it works and the
data will be populated correctly on the form too.

What is the Recordsource of the form; the Control Source of the combo; the
datatype of that field (in particular, is it a Lookup field?); and the
RowSource of the combo (post the SQL).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top