J
JoeK2001
The message say: Run-time error '2221': The 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
*As of now:
The field size in the source box has been switch to 255 from 100. I am sure
the coding has something to do with this error. Could it be the data type
that is not allowing this long text? Should I convert it to something else?
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
*As of now:
The field size in the source box has been switch to 255 from 100. I am sure
the coding has something to do with this error. Could it be the data type
that is not allowing this long text? Should I convert it to something else?