Multivalue combo box question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a question perhaps someone can help me with. I am using the lookup
combo box with multi value option in my forms to display one or multiple
colors available in horses. It is working great except one thing I am
wondering. Is it possible to change or even not use the comma's that come up
as dividers between each value entered. I need it to say red dun instead of
red, dun when displayed in my form. Any suggestions?
 
Presumably we are talking about Access 2007 here, as previous versions did
not have multi-valued fields or combos that supported multiple values.

You cannot remove the delimiter from the combo itself.

You could display the result in a text box without the comma if you looped
through the array of values selected in the control and generated a string.

Alternatively, you could just DLookup() the values in the field (assuming
the bound field is the visible one), and use Replace() to remove the comma.
The expression for the text box would be something like this:
=Replace(DLookup("Field1", "Table1", "SomeField = """ & [MyKeyID] &
"""), ",", "")
For help with forming the 3rd argument for DLookup(), see:
http://allenbrowne.com/casu-07.html
 

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

Back
Top