 |
| 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
|
|
|
|

December 7th, 2007, 08:15 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Memo Field
I have a memo field in a form that shows full text detail (745 Char)
When I link a listbox to the table the form only displays 255 char
What can I do
Thanks
Brendan Bartley
__________________
Brendan Bartley
|
|

December 7th, 2007, 08:49 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Hello, Brendan. That's because 255 characters are all that listboxes and comboboxes are allowed to hold. Note that memo fields should not be control sources for listboxes or comboboxes anyway. Lists that people are going to pick from need to be short and sweet.
|
|

December 10th, 2007, 06:33 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Is there anyway of say linking a text box field to another text box field for shaowing in one subject and the other note field
Thanks
Brendan Bartley
|
|

December 10th, 2007, 09:17 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
I'm sorry, but you lost me. Can you rephrase your question? Perhaps if you showed us exactly which fields / controls you're talking about. Thanks.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

December 10th, 2007, 10:20 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
OK I have a database that 10 users use. From time to time during the day messages are put up on the database. The listbox is used as the subject and the text field is the note field. Its simple the users click on the subject field and it displays the note field. The only disadvantage to this is the 255 char.
Thanks
Brendan Bartley
|
|

December 10th, 2007, 12:08 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Gotcha.
My thoughts are that listboxes should not hold contents of memo fields anyway. The listbox should have a list of SHORT items, not whole paragraphs. Create another field with a short and sweet summary of the topic of disucssion of the memo field. When the the person selects one, you can have another textbox show the contents of the memo field based on the topic chosen in the listbox.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

December 10th, 2007, 12:35 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Could you suggest some code to display from the listbox to the text box
Thanks
Brendan Bartley
|
|

December 10th, 2007, 02:38 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Let's say you created another field in the table (called, e.g. tblSubject) that holds the short and sweet subject summary, say strSubjSummary. And since I don't know the name of your memo field, say that one is called memSubject (I'm making up names). Say your listbox is called lstSubject.
You would put an unbound textbox in your form called, say txtSubjSummary. In the listbox's AfterUpdate event, you'd have something like:
Me.txtSubjSummary = DLookUp("[memSubject]", "tblSubject", "[strSubjSummary] = '" & Me.lstSubject & "'")
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

December 11th, 2007, 07:36 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for your reply. The listbox working fine the only problem is if there is a duplicate wording in the listbox both listing in the listbox only shows the one result in the textbox. I have added a autonumber is there anyway to incorporate this number so that this will cause to show in the listbox different results in the textbox
Brendan Bartley
|
|

December 11th, 2007, 08:56 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Yes, you can use the .Column property on the listbox to get the autonumber, e.g. Me.MyListBox.Column(1)
But my question is, WHY are there duplicate entries in the listbox? There shouldn't be any. If you created its record source via SQL, use the SELECT DISTINCT syntax. If you used a query, use the select unique values option.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|
 |