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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 | |
|
|
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 |