Error '3163'

S

Saxman

If I input a city with hyphens such as Burnham-on-Crouch into my customer form, all
is fine. However, if I then want to place a new order from the 'Orders' form from a
combo box with the customers name (which is updated from the cutomer table), I get
the following run-time error.
..................................................................
Run-time error '3163'
The field is too small to accept the amount of data you attempted to add. Try
inserting or pasting less data.

The error refers to Me!ShipCity = Me!City in the code below.
................................................................
Private Sub CustomerID_AfterUpdate()
' Update ShipTo controls based on value selected in CustomerID combo box.
Me!ShipName = Me![CustomerID].Column(1)
Me!ShipAddress = Me!Address
Me!ShipCity = Me!City
Me!ShipRegion = Me!Region
Me!ShipPostalCode = Me!PostalCode
'Me!ShipCountry = Me!Country

End Sub
................................................................

I still get the error if I remove the hyphens and enter (with spaces) the data as
Burnham on Crouch. Entering Burnhamoncrouch gives no errors.

The 'Bill To' details are correct on the 'Orders' form whatever I input, but the
last three fields in 'Ship To' details are incorrect if I use a hyphen or space as
describeb above.

Looking at my 'Customers' table in design mode and looking at 'City' properties, I
have the following:-

Field Size: 60
Required: No
Indexed: Yes(Duplicates OK)
Unicode Compression: Yes
IME Mode: No control
IME sentence Mode: None

There is no input mask.

Any ideas?
--
 
S

Saxman

Saxman said:
If I input a city with hyphens such as Burnham-on-Crouch into my customer form, all
is fine. However, if I then want to place a new order from the 'Orders' form from
a combo box with the customers name (which is updated from the cutomer table), I
get the following run-time error.
.................................................................

I've sorted it out myself eventually. I had the wrong reference in the Ship To
field.
 

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