Hi piltdownster

A couple of ways to answer the question:

The combo box and list box controls supplied with OO.o do not support
displaying data from multiple datasource columns directly.

That said, for display purposes only this is in no ways a short coming.
Since the controls can be filled from queries the data can be put into
pretty much any format you want. From as many columns, in as many tables, as
you need.

If you are needing help with the development of the query for this, then I
would recommend you look up the concat command. For example

SELECT CONCAT( "LastName", CONCAT( ', ', "FirstName" ) ) AS "FullName" from
tblName

would give you the type of display you want. As a side note, to create that
command using the query designer you simply enter CONCAT( "LastName",
CONCAT( ', ', "FirstName" ) ) into the field name cell, it is best to also
give this column an explicit name. You do that by entering FullName in the
cell just below this.

In the case of a combo box then this is not a good thing if you are also
trying to write a value to an attached data field. But that is really not a
problem either as you simply use the list box instead. The list box is
designed to allow you to display this type of calculated field and bind a
separate, second, value to the attached field..

If you want to see more detailed examples you will find a few on the Base
board at OOoForum.org. You can search for "combobox concat" and will find
the message threads to start off.

As an aside. This question comes up often on the Forum lists. Quite often in
fact, and it seems to continue to come up even now after the Base module has
been out for 2 years plus. I believe the reason is because of the wizard
that is used for the controls. The first page only allows the choice of a
table from the data source. As I said above the fact that the controls are
designed to display to values is not, IMO, a real short coming. But when a
new user is presented only tables, from which they can select only
individual fields for either of those values it does create a short coming.
Add to this that the major competitors controls are designed to work
differently, allowing multiple selection of fields directly and this turns
this 'simple' design decision into an apparent lack of support for a
feature.

I know that there has been work done on changing these controls to directly
support multiple columns but that work seems to have been sluggish to
receiving resources. A possibly quicker way to address this would be add the
ability to not only select queries and tables from the first page of the
wizard, but also to start the query designer preloaded with one of those
choices. Knowing that you have added just this type of action to a number of
other editors recently perhaps it would not be that large of a project to
retrofit this wizards page either. Before anyone says it - I will open an
RFE with just this suggestion.

On 6/14/07, piltdown <[EMAIL PROTECTED]> wrote:

I have a table containing personal details i.e. lastname, firstname,
address1, address2 etc.

I would like a combo box to display not just one field but two seperated
by a  comma - i.e. Bloggs, Fred

Any ideas?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to