Solved

have text field w/>255 characters in a combobox in Access

Posted on 2008-10-31
18
412 Views
Last Modified: 2012-08-13
I have a query tied to a combobox.  It pulls in the Number, Topic and Text from a single table.  However, once I select the topic that displays in the combobox it is suppose to populate via code the text box.  The textbox is a memo field and data is > than 255 characters.  So how do I get this to work?
0
Comment
Question by:avalonwgi
  • 8
  • 6
  • 4
18 Comments
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Not clear what the problem is ?

Me.YourTextBoxName = Me.YourComboBoxName.Column(2)  

Column numbers are zero based ... 2 would be the Text column in the combo.

mx
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility
I had a similar problem in Crystal Reports and most often, unfortunately, since the size limit, you may have to truncate the dataString...I also noticed that a Label takes as much as you can throw at it, so that may be the way to go...using a  styled label or even trying to find a way to place a label inside of the combobox...
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility
besides, memo fields have limitations on their as people sought this as a solution, but was unable to make that work out.
0
 

Author Comment

by:avalonwgi
Comment Utility
DatabaseMX,
Thanks, but that part I have and works fine.  THe text data in column(2) is pulling in a memo field that has > 255 characters, however it only populates in the me.textbox only the first 255 characters.  Does that help?
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Text boxes can had more than 255 characters. Set the text box's Enter Key Behavior property to

'New Line in Field' ... and Scroll Bars to Vertical.

mx

0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Make the 'Can HOLD ...'

mx
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
This issue may be that the Combo box column cannot hold more than 255 characters ... which I think is the case.

mx
0
 

Author Comment

by:avalonwgi
Comment Utility
Databasemx,
so in response to your last posting, let's say there is a limit on the characters per column.  How would you recommend getting that data selected and then populated into the text box?
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
Comment Utility
Well, I suppose you could ... make the selection with the combo (get rid of the Text col) ... then do a DLookup in the table and return the full text, then populate your text box.

mx
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:avalonwgi
Comment Utility
Let me give that a try later today as I have meetings the rest of the afternoon.  Thanks DatabaseMX

Dave
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility
i sort of stated gave you the answer that these other controls have limits except for the Label...anyway...good luck...
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility
you can set the label Text = ..........................
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
"you can set the label Text = .........................."

Huh ?

mx
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility
I'm saying a Label is a control that doesn't have a limit and '...' usually stands for infinitely (a gross exaggeration, but point is Label control can take a larger amount of text than most controls) a large amount of characters...but i don't see how it could work if he's using a textbox which has a length limit of 255 unless he takes major precautions to truncate...Unless he has to exit data in Textbox, I was explaining maybe a label would be the way to go...
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility

exit  = edit
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
"textbox which has a length limit of 255 "

No.  An Access Text box does *not* have a limit of 255.  I can in fact hold a Memo field's worth of data.

The issue is with the combo box Column truncating the field's data.

mx
0
 

Author Comment

by:avalonwgi
Comment Utility
DatabaseMX is correct.  THe issue is with the combobox column truncating the fields data.  So are you able to load a combobox with a column being a memo field and not have it truncate the data when you put it to a textbox on the form after selecting?  Dave
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
"So are you able to load a combobox with a column being a memo field and not have it truncate the data"

Not that I can see. It's a limitation of the combo box  (columns).  Try the DLookup approach to get the memo text.

mx
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now