Re: Access 2003 Combo problem



G'day Chuck

I am by far a long way off MVP, and I'm certain you'll get a few responses,
but here's my 2 cents worth for free.

If you have BoundColumn set @ 1 then it will try and insert the Name, not
the Abv, that's why your getting the error message "Too Long"
What's happening is that you are attempting to insert the Name, not the Abv
into the field.

Have a questions.?

1. What do you want stored, the Name or The Abv.

Change it to this:

SELECT [tblState].[StateAbv], [tblState].[StateName] FROM [tblState];

2. Why does the user have to enter in three places.

You could use something like this in the AfterUpdate()

Me.Place_1 = YourCombo.Column(0)
Me.Place_2 = YourCombo.Column(0)
Me.Place_3 = YourCombo.Column(0)

Column(0) is correct, (0) is interpreted as the first column by VBA.
(Something along those lines) this will automatically populate the areas in
1 instance.

Though I am still intrigued as to why 3 times, couldn't you just add an
index to your "Abv field", then a One-to-Many Relationship could be
established.

HTH
Mark.





<ceb39@xxxxxxxxx> wrote in message
news:1179380420.708851.203610@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have an access form I have been using for four years without any
major problems. Part of the data entry requires a user to enter a
state two letter designation in three places. I am trying to modify
the form to use a combo box which displays the two letters of the
states and then allow the user to select the state.

I have established a table with the the state name in one field (30
characters long) and the two letter combination in the other field (2
characters long).

I have placed a combo box on the form I am using and see the various
two letters display. Once selected this two letter combination is to
be displayed on the form and stored in the appropriate field the form
data goes to. Only problem is when I select the two letter
combination a dialog warning box appears with the following message:

"The field is too small to accept the amount of data you attempted to
add. Try inserting or pasting less data."

The field in the table where I get the two letter combination is two
characters long, and the three fields in the table where the form data
goes are all two characters long. Any one have an idea what is
generating this error message?

The Row Source statement looks like this:

SELECT [tblState].[StateName], [tblState].[StateAbv] FROM [tblState];

Any help would be appreciated.

Thanks

Chuck Buckley



.



Relevant Pages

  • Re: Access 2003 Combo problem
    ... that's why your getting the error message "Too Long" ... What's happening is that you are attempting to insert the Name, not the Abv ... characters long) and the two letter combination in the other field (2 ... I want to store the abv of the state. ...
    (microsoft.public.access.formscoding)
  • Re: New-Line in Regular Expression
    ... really good responses. ... > # Open the file for reading and if cannot die and give error message. ... > # While the file is open read through it and remove new line characters. ... > # For each item in the array print it out. ...
    (perl.beginners)
  • Re: Evil character joining party with paladin part 2
    ... Chuck did that to me. ... mentioned a virus that took the form of a porn video of a famous ... reprise characters from cult classic movies. ... Terry Austin: like the polio vaccine, ...
    (rec.games.frp.dnd)
  • Re: New-Line in Regular Expression
    ... reason: POP3 Host did not acknowlege ... > # While the file is open read through it and remove new line characters. ... > # For each item in the array print it out. ... match the date field and the time field, and stored the exact log error message ...
    (perl.beginners)
  • RE: Repost - RunTime Error - Field too small
    ... Jet won't store changes to the external database in the table ... Here is the DLookup statement in the AfterUpdate event of the FacilityNumber ... If the name is longer that 30 characters, I get the error message. ...
    (microsoft.public.access.formscoding)