Textbox autofill

M

Marc Claasen

Hi there,

I hav an MS Access 200 ADP connecting to a
SQL server 200 database.
I use a combobox as a short cut for filling in a text box in a form.
The textbox is filled with standard texts and when the user selects one from
the
list, the text is copied into the textbox. The user can also add, edit the
text.
The text box is bound to a varchar(1500) field in the SQL database.

This works OK if the text in the textbox contais less then 256 characters.
If the total length of the text becomes more than 256, the text in the
textbox is
cut off and only a small part of the text from the combobox remains.
The strange thing is that if I insert text MANUALLY till 1500 characters it
is going right.
And it also works if the textbox is unbound.

Can anyone tell me how I can solve this?

Here is my code snippet.
==========================================================
<CODE>
Private Sub cboStandaardOmschrijvingen_AfterUpdate()

Dim bUseFriendlyText As Boolean

bUseFriendlyText = CBool(GetOption("USE_FRIENDLY_TEXT"))

If bUseFriendlyText = True Then
If (Not IsNull(Me.DESCRIPTION.Value)) Then
If (cboStandaardDesc.Column(2) <> "") Then
Me.DESCRIPTION = Me.DESCRIPTION & vbCrLf &
cboStandaardDesc.Column(2)
Else
Me.DESCRIPTION = Me.DESCRIPTION & vbCrLf &
cboStandaardDesc.Column(1)
End If
Else
If cboStandaardDesc.Column(2) <> "" Then
Me.DESCRIPTION = Me.DESCRIPTION & vbCrLf &
cboStandaardDesc.Column(2)
Else
Me.DESCRIPTION = Me.DESCRIPTION & vbCrLf &
cboStandaardDesc.Column(1)
End If
End If
Else
If (Not IsNull(Me.DESCRIPTION.Value)) Then
Me.DESCRIPTION = Me.DESCRIPTION & vbCrLf & cboStandaardDesc.Column(1)
Else
Me.DESCRIPTION = cboStandaardDesc.Column(1)
End If
End If

'Als men de omschrijving heeft gewijzigd, wordt dit gelogd in de
statustabel.
Call InsertComplaintStatus(Me.COMPLAINT_ID, Me.OBJECT_ID, "C", "")
Call Me.Controls("frmComplaintStatus").Requery

End Sub
</CODE>
Kind regards,

Marc Claasen
 
Top