473,574 Members | 2,600 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

no format assignment for a form's textbox control... Access assumes control's data is going to be placed in a finite length text field of a table

MLH
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box

A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;

When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.

So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.
Nov 12 '05 #1
13 2500
What is the bound column of the combobox? Is it's data longer than the field
it is going into?

Mike Storr
www.veraccess.com
"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******** *************** *********@4ax.c om...
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box

A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;

When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.

So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.

Nov 12 '05 #2
You say that BodyMsgsSent.Bo dyTextHere is a memo field;
what about BodyMsgsSent.Bo dyText?

That's where you're trying to stuff this information.

- Turtle

"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******** *************** *********@4ax.c om...
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box

A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;

When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.

So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.

Nov 12 '05 #3
MLH
Its an UNbound control
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx x
On Sun, 11 Jan 2004 15:24:12 -0500, "Mike Storr"
<st******@sympa tico.ca> wrote:
What is the bound column of the combobox? Is it's data longer than the field
it is going into?

Mike Storr
www.veraccess.com
"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******* *************** **********@4ax. com...
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box

A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;

When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.

So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.


Nov 12 '05 #4
MLH
Its a memo field
xxxxxxxxxxxxxxx xxxxxx

On Sun, 11 Jan 2004 21:59:33 GMT, "MacDermott " <ma********@nos pam.com>
wrote:
You say that BodyMsgsSent.Bo dyTextHere is a memo field;
what about BodyMsgsSent.Bo dyText?

That's where you're trying to stuff this information.

- Turtle

"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******* *************** **********@4ax. com...
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box

A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;

When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.

So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.


Nov 12 '05 #5
One column of the combo box is set to return a value when a choice is made.
This is called the "Bound Column". It does not mean it is bound to a field
in a table. The default for the column is 0, meaning the first one. When a
choice is made, the value of the combobox becomes whatever value is in the
bound column. Check to see that it's the right datatype and within the
length limit of the table field you're trying to put it in.
"MLH" <CR**@NorthStat e.net> wrote in message
news:li******** *************** *********@4ax.c om...
Its an UNbound control
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx x
On Sun, 11 Jan 2004 15:24:12 -0500, "Mike Storr"
<st******@sympa tico.ca> wrote:
What is the bound column of the combobox? Is it's data longer than the fieldit is going into?

Mike Storr
www.veraccess.com
"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******* *************** **********@4ax. com...
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box

A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;

When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.

So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.

Nov 12 '05 #6
MLH
On Sun, 11 Jan 2004 22:31:29 -0500, "Mike Storr"
<st******@sympa tico.ca> wrote:
One column of the combo box is set to return a value when a choice is made.
This is called the "Bound Column". It does not mean it is bound to a field
in a table. The default for the column is 0, meaning the first one. When a
choice is made, the value of the combobox becomes whatever value is in the
bound column. Check to see that it's the right datatype and within the
length limit of the table field you're trying to put it in.

The combo box control contents are not producing the error. If we take
the combo box off the form and remove its reference from the query,
the error still occurs. Its the LONG text string in the text box that
produces the error.

My work-around has been to Dim 2 global vars as String, assign
them values of the strings in the 2 controls on the form AfterUpdate
of each control and reference the global vars inside my append
query. The query works as desired - putting the same identical VLS
into the table's memo field - but with no "Field length is too
long" error. I'm still quite curious as to why I can't put the same
string in there with a Forms!FormName! ControlName reference.
Nov 12 '05 #7
How are you running this SQL?
Is it saved as a query?
Are you using DoCmd.RunSQL or CurrentDB.Execu te?

- Turtle

"MacDermott " <ma********@nos pam.com> wrote in message
news:9H******** ********@newsre ad3.news.atl.ea rthlink.net...
You say that BodyMsgsSent.Bo dyTextHere is a memo field;
what about BodyMsgsSent.Bo dyText?

That's where you're trying to stuff this information.

- Turtle

"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******** *************** *********@4ax.c om...
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box

A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;

When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.

So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.


Nov 12 '05 #8
MLH
I'm using RunSQL to launch it. I've saved it as a query
and ran it that way - same problem either way.
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxx
On Tue, 13 Jan 2004 01:43:02 GMT, "MacDermott " <ma********@nos pam.com>
wrote:
How are you running this SQL?
Is it saved as a query?
Are you using DoCmd.RunSQL or CurrentDB.Execu te?

- Turtle

"MacDermott " <ma********@nos pam.com> wrote in message
news:9H******* *********@newsr ead3.news.atl.e arthlink.net...
You say that BodyMsgsSent.Bo dyTextHere is a memo field;
what about BodyMsgsSent.Bo dyText?

That's where you're trying to stuff this information.

- Turtle

"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******** *************** *********@4ax.c om...
> I have a form with two controls:
> [Forms]![frmMainMenu]![RootTable] - combo box
> [Forms]![frmMainMenu]![BodyTextHere] - text box
>
> A button on the form tries to run this SQL when clicked...
> INSERT INTO BodyMsgsSent (ToWhom, BodyText)
> SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
> [Forms]![frmMainMenu]![BodyTextHere] AS MyList;
>
> When the SQL runs, it fails with msg saying "Field length is too
> long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
> memo-type field. If the string I type in
> [Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
> occur. But naturally, this control is likely to have a LOT of text in
> it. It is, after all, made to hold the body text of a letter.
>
> So, why does Access fail when trying to put the contents of this
> control into a table's memo field when there are, say, 400 chars
> typed into the control??? I have no way of formatting the control
> to tell Access 2.0 that the control is supposed to contain VLSs
> intended for storage into a memo field.



Nov 12 '05 #9
Could you post the actual line of code?

- Turtle

"MLH" <CR**@NorthStat e.net> wrote in message
news:qp******** *************** *********@4ax.c om...
I'm using RunSQL to launch it. I've saved it as a query
and ran it that way - same problem either way.
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxx
On Tue, 13 Jan 2004 01:43:02 GMT, "MacDermott " <ma********@nos pam.com>
wrote:
How are you running this SQL?
Is it saved as a query?
Are you using DoCmd.RunSQL or CurrentDB.Execu te?

- Turtle

"MacDermott " <ma********@nos pam.com> wrote in message
news:9H******* *********@newsr ead3.news.atl.e arthlink.net...
You say that BodyMsgsSent.Bo dyTextHere is a memo field;
what about BodyMsgsSent.Bo dyText?

That's where you're trying to stuff this information.

- Turtle

"MLH" <CR**@NorthStat e.net> wrote in message
news:mo******** *************** *********@4ax.c om...
> I have a form with two controls:
> [Forms]![frmMainMenu]![RootTable] - combo box
> [Forms]![frmMainMenu]![BodyTextHere] - text box
>
> A button on the form tries to run this SQL when clicked...
> INSERT INTO BodyMsgsSent (ToWhom, BodyText)
> SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
> [Forms]![frmMainMenu]![BodyTextHere] AS MyList;
>
> When the SQL runs, it fails with msg saying "Field length is too
> long". I don't know why, because BodyMsgsSent.Bo dyTextHere is a
> memo-type field. If the string I type in
> [Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not > occur. But naturally, this control is likely to have a LOT of text in
> it. It is, after all, made to hold the body text of a letter.
>
> So, why does Access fail when trying to put the contents of this
> control into a table's memo field when there are, say, 400 chars
> typed into the control??? I have no way of formatting the control
> to tell Access 2.0 that the control is supposed to contain VLSs
> intended for storage into a memo field.

Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4247
by: NewBob | last post by:
Since Access automatically highlights all of the text in a text control (I use it to hold data from a memo field) when the control is activated, I've added the following code to put the cursor at the end. Private Sub txtCapability_GotFocus() ‘ Placed either behind the OnEnter or GotFocus Event of a control named, ' in this case,...
13
3595
by: Aladdin | last post by:
I have an MS Access form on which I have a listbox listing tables in that database. I want to be able to click on any of those tables and view its contents on the same form using subforms or any grid control. I tried many grid controls (DBGrid, DataGrid, MSFlexGrid), the ADO Data Control and everything I can think of, with no success. Here...
6
3460
by: LSemos | last post by:
I am trying to lookup phone numbers in a separate table based on the name in the current Tab control tblContacts has the fields: Name, Phone, Fax, and Email In my Form's Tab control, I have the fields: DVP, Phone, Fax and Email. In the On Click properties of the Phone field, I have the following: =DLookUp("","","='" & & "'")
3
6601
by: Nothing | last post by:
This is going to be a really stupid question, but I am having a problem with the percent format in a control on a form. My end goal is that I want the user to enter 17 and have the control display 17% and hold the value of seventeen percent. I have the control propertes set to the following: Name: comflatpercent Format: percent
1
2253
by: Miguel Dias Moura | last post by:
Hello, I created a page with one form and 10 Input Text fields. The Form data is added to an Access Database when "OK" button is pressed. One of the Form's Input Text has more than one line. The user uses this to write its Curriculum Vitae. The Curriculum Vitae is inserted in the MEMO type "CV" field.
13
2418
by: Randy Jackson | last post by:
Hello, I'm creating a sample portfolio application for MS-Access XP, and I'm wondering if there's a suitable replacement for the ms-access textbox control. I'm looking for something similar to an HTML textarea control, but without rich text formatting. I know you can just use a regular textbox and expand it, but it still has size...
6
2596
by: kaosyeti | last post by:
hey.... i have a duplicate record issue i could use some help with. on a form that has 2 unbound controls, txtboxyear and cboxmonth, together will automatically fill in an invisible txtboxdate that is bound to a table and has no duplicates allowed. the problem is that there are 30 or so other controls here to be filled in and if the user...
11
2241
by: RipperT | last post by:
Don't know if this group covers web apps, but here goes. In VS 2005, I am trying to get variables to hold thier values during postback from the server. I convert a text box's user-keyed value to an integer and assign it to a module level variable, then convert the variable and assign it to a hidden text box, setting it's EnableViewState to...
9
5724
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo field is printed within the detailed area. The problem is, the apllication is not setup properly, thus the users are entering data within the memo...
0
7814
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7736
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8249
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7826
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3756
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1352
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1071
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.