Solved

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

Posted on 2008-10-31
18
414 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
ID: 22852599
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
ID: 22852613
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
ID: 22852622
besides, memo fields have limitations on their as people sought this as a solution, but was unable to make that work out.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:avalonwgi
ID: 22852671
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
ID: 22852707
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
ID: 22852710
Make the 'Can HOLD ...'

mx
0
 
LVL 75
ID: 22852717
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
ID: 22852734
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
ID: 22852818
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
 

Author Comment

by:avalonwgi
ID: 22852940
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
ID: 22852960
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
ID: 22852964
you can set the label Text = ..........................
0
 
LVL 75
ID: 22852999
"you can set the label Text = .........................."

Huh ?

mx
0
 
LVL 21

Expert Comment

by:silemone
ID: 22853114
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
ID: 22853119

exit  = edit
0
 
LVL 75
ID: 22853265
"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
ID: 22854597
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
ID: 22854625
"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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

805 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