A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Textbox autofill



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2005, 01:48 PM
Marc Claasen
external usenet poster
 
Posts: n/a
Default Textbox autofill

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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to print textbox? Nikki Powerpoint 5 April 25th, 2005 04:11 PM
Textbox, web browser control, and Unicode (got cutoff) Mark Johnson General Discussion 0 February 12th, 2005 01:08 AM
Autofill textbox from combobox Rene Using Forms 2 November 7th, 2004 01:49 PM
textbox used as report parameter jh Setting Up & Running Reports 4 October 21st, 2004 06:59 PM
textbox formatting problem jeffrey c Powerpoint 4 August 21st, 2004 10:09 AM


All times are GMT +1. The time now is 08:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.