Run time error 2221: The text is too long to be edited.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The message say: "The text is too long to be edited."

I had been successful in turning a drop-down box into an automatic updated
box from the utilization of the events and macros. However, when I select
some entries that had a long names. This error would show up. Therefore any
entires with more than 50 characters would trigger this error. However, the
entries with 50 or less characters worked perfectly. I am not sure if this is
the limitation of the string data type or something else.

The code for this function:

Dim sql4 As String

Me.cmbProject_Short_Name.SetFocus
sql4 = "SELECT [Program Name].[Project Short Name] FROM [Program Name] WHERE
((([Program Name].[Project Number])='" & Me.CmboProjectNumber & "') AND
(([Program Name].[Active Project])= Yes));"
Set rssql4 = CurrentDb.OpenRecordset(sql4)
If IsNull(rssql4(0)) Then
Me.cmbProject_Short_Name.Text = ""
Else
Me.cmbProject_Short_Name.Text = rssql4(0)

End If
 
Check the size of the underlying field in the table. Many default text
field size to 50 characters.
 
The field size from the source table is set at 100. Therefore, it should not
be the people. The indirect source is the table. The direct source is from a
query that grapped the same information from the column.

KARL DEWEY said:
Check the size of the underlying field in the table. Many default text
field size to 50 characters.

JoeK2001 said:
The message say: "The text is too long to be edited."

I had been successful in turning a drop-down box into an automatic updated
box from the utilization of the events and macros. However, when I select
some entries that had a long names. This error would show up. Therefore any
entires with more than 50 characters would trigger this error. However, the
entries with 50 or less characters worked perfectly. I am not sure if this is
the limitation of the string data type or something else.

The code for this function:

Dim sql4 As String

Me.cmbProject_Short_Name.SetFocus
sql4 = "SELECT [Program Name].[Project Short Name] FROM [Program Name] WHERE
((([Program Name].[Project Number])='" & Me.CmboProjectNumber & "') AND
(([Program Name].[Active Project])= Yes));"
Set rssql4 = CurrentDb.OpenRecordset(sql4)
If IsNull(rssql4(0)) Then
Me.cmbProject_Short_Name.Text = ""
Else
Me.cmbProject_Short_Name.Text = rssql4(0)

End If
 
I still could not solve the problem. I had checked the field size and it was
already set at 100. Therefore that should not be the problem.

KARL DEWEY said:
Check the size of the underlying field in the table. Many default text
field size to 50 characters.

JoeK2001 said:
The message say: "The text is too long to be edited."

I had been successful in turning a drop-down box into an automatic updated
box from the utilization of the events and macros. However, when I select
some entries that had a long names. This error would show up. Therefore any
entires with more than 50 characters would trigger this error. However, the
entries with 50 or less characters worked perfectly. I am not sure if this is
the limitation of the string data type or something else.

The code for this function:

Dim sql4 As String

Me.cmbProject_Short_Name.SetFocus
sql4 = "SELECT [Program Name].[Project Short Name] FROM [Program Name] WHERE
((([Program Name].[Project Number])='" & Me.CmboProjectNumber & "') AND
(([Program Name].[Active Project])= Yes));"
Set rssql4 = CurrentDb.OpenRecordset(sql4)
If IsNull(rssql4(0)) Then
Me.cmbProject_Short_Name.Text = ""
Else
Me.cmbProject_Short_Name.Text = rssql4(0)

End If
 
If you are talking about the source table field for the drop-down box is set
at 100 I was not. I am talking about the table where the data will be placed.

JoeK2001 said:
The field size from the source table is set at 100. Therefore, it should not
be the people. The indirect source is the table. The direct source is from a
query that grapped the same information from the column.

KARL DEWEY said:
Check the size of the underlying field in the table. Many default text
field size to 50 characters.

JoeK2001 said:
The message say: "The text is too long to be edited."

I had been successful in turning a drop-down box into an automatic updated
box from the utilization of the events and macros. However, when I select
some entries that had a long names. This error would show up. Therefore any
entires with more than 50 characters would trigger this error. However, the
entries with 50 or less characters worked perfectly. I am not sure if this is
the limitation of the string data type or something else.

The code for this function:

Dim sql4 As String

Me.cmbProject_Short_Name.SetFocus
sql4 = "SELECT [Program Name].[Project Short Name] FROM [Program Name] WHERE
((([Program Name].[Project Number])='" & Me.CmboProjectNumber & "') AND
(([Program Name].[Active Project])= Yes));"
Set rssql4 = CurrentDb.OpenRecordset(sql4)
If IsNull(rssql4(0)) Then
Me.cmbProject_Short_Name.Text = ""
Else
Me.cmbProject_Short_Name.Text = rssql4(0)

End If
 
Thanks for replying... I had checked. On the design view of my form under the
properties of that drop-down box, there was not a criteria for field size. I
had extended the widths of the box but it was no help. I am really not sure
what could be affecting this. Thanks for your countinue help.

KARL DEWEY said:
If you are talking about the source table field for the drop-down box is set
at 100 I was not. I am talking about the table where the data will be placed.

JoeK2001 said:
The field size from the source table is set at 100. Therefore, it should not
be the people. The indirect source is the table. The direct source is from a
query that grapped the same information from the column.

KARL DEWEY said:
Check the size of the underlying field in the table. Many default text
field size to 50 characters.

:

The message say: "The text is too long to be edited."

I had been successful in turning a drop-down box into an automatic updated
box from the utilization of the events and macros. However, when I select
some entries that had a long names. This error would show up. Therefore any
entires with more than 50 characters would trigger this error. However, the
entries with 50 or less characters worked perfectly. I am not sure if this is
the limitation of the string data type or something else.

The code for this function:

Dim sql4 As String

Me.cmbProject_Short_Name.SetFocus
sql4 = "SELECT [Program Name].[Project Short Name] FROM [Program Name] WHERE
((([Program Name].[Project Number])='" & Me.CmboProjectNumber & "') AND
(([Program Name].[Active Project])= Yes));"
Set rssql4 = CurrentDb.OpenRecordset(sql4)
If IsNull(rssql4(0)) Then
Me.cmbProject_Short_Name.Text = ""
Else
Me.cmbProject_Short_Name.Text = rssql4(0)

End If
 

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

Back
Top