Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2008-10-31
18
418 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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 - Microsoft MVP, Access and Data Platform) 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…

828 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