Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2007, 10:40 AM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listbox Problem

Hi All
I have a listbox that displays messages.Some of the messages are quite large and cannot be fully read in the listbox.Is there anyway that by clicking on a message it will display the full view of the message
Thanks

Brendan Bartley
__________________
Brendan Bartley
 
Old November 16th, 2007, 11:32 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You can probably put a text box on the form and when the user clicks the list item, the text is displayed in the text box. Make the text box flat with no border and put itmaybe in the upper right of the list box. Maybe something like that. I don't think you could do a mouse over and get the list item.

mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old November 21st, 2007, 08:11 AM
Registered User
 
Join Date: Jul 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am going through this same thing right now. I solved the issue by using a single-click event on the item select on the listbox and transferring any other data the user wanted viewable into either labels or textboxes. It works quite well.

I suggest using a primary/unique key as your first item and set the listbox property Column Widths to 0" for the first column. (hiding the primary/unique key from view)I normally do this in case I want to lookup any other data later on using the listbox.
Use listboxname.column(0) to get the value from the first column, listboxname.column(1) from the second column, etc.

I like using label captions to display the info because the user can't change a label caption and requires less work than a textbox.

listboxname_Click() event
EX: me.labelname.caption = listboxname.Column(1)










 
Old November 26th, 2007, 12:04 PM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your reply. Your reply has worked. I have very little room
in my listbox is there anyway to hide the listbox and show the caption
Thanks

Brendan Bartley
 
Old November 26th, 2007, 01:34 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

How would the user select an item if it were hidden? If they don't ned to select an item, then just hide the list box with the properties dialog (Visible = No) or with code: Me.ListBox.Visible = False.



mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox problem aliirfan84 ASP.NET 2.0 Professional 5 May 28th, 2007 08:39 AM
listbox problem faizee36 Access VBA 4 April 27th, 2006 09:58 AM
ListBox Problem spacy ASP.NET 1.x and 2.0 Application Design 2 October 18th, 2004 05:45 AM
A ListBox problem csc820203 C# 6 June 15th, 2004 06:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.