Problem showing memo field in list box

P

paul.schrum

I am using Access 2007 in 2002-2003 mode.

I have a memo field in a linked table tbl_tasks.description. When I
use the Listbox wizard to create a listbox, at the point where the
wizard shows me what fields are available to include in the Listbox,
it does not show me the memo field.

I bypassed that and created the listbox anyway, then modified the
rowsource of the listbox to add in the memo field. When I tried this,
and when I open the form, Access prompts me for the value of
tbl_tasks.description.

When I search the newsgroups on this general subject, I see that
listboxes generally show a truncated version of the contents of the
memo field. But I am not even getting that (I would be happy with
that behavior). What might I be doing wrong?

Thanks in advance.

- Paul
Schrum
 
A

Arvin Meyer [MVP]

Memo fields cannot be used at all, but you can play a trick on Access and
use the first 255 characters. Use a saved query for the rowsource of your
list box.

In the query, add a column like this:

NewDescription: Left([tbl_tasks].[description], 250)

now use this in your list box:

Select * From MySavedQuery;
 
P

paul.schrum

Arvin,

Thanks. I will give it a go.

- Paul

Memo fields cannot be used at all, but you can play a trick on Access and
use the first 255 characters. Use a saved query for the rowsource of your
list box.

In the query, add a column like this:

NewDescription: Left([tbl_tasks].[description], 250)

now use this in your list box:

Select * From MySavedQuery;
--
Arvin Meyer, MCP, MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com


I am using Access 2007 in 2002-2003 mode.
I have a memo field in a linked table tbl_tasks.description. When I
use the Listbox wizard to create a listbox, at the point where the
wizard shows me what fields are available to include in the Listbox,
it does not show me the memo field.
I bypassed that and created the listbox anyway, then modified the
rowsource of the listbox to add in the memo field. When I tried this,
and when I open the form, Access prompts me for the value of
tbl_tasks.description.
 
D

Dale Fye

Paul,

Another way I have handled this is to use the listboxes MouseUp event to
check for a button click. I test to see if it is the right button, and if
so, display some text in a message box, something like:

Private Sub List0_MouseUp(Button As Integer, Shift As Integer, _
X As Single, Y As Single)

Dim strMsg as string

If Button = acRightButton Then
strMsg = DLOOKUP("MemoField", "YourTable", "[PKField] = " & me.list0)
MsgBox strMsg
End If

End sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top