Configure Drop Down to Display Values from Multiple Database Columns

S

scottchampion

I've got a drop down whose values are based on an access database
table. The access database table has the following columns:

ID, Description, Points

Currently, the values in the Description field populates the drop down
menu. I'd like the drop down to also display the values in the Points
field:

For example:

The database table contains:
ID, Description, Points
1, Happy, 2
2, Sad, 8
3, Elated, 1

Drop down displays:
Happy (2)
Sad (8)
Elated (1)

Can someone point me to a resource on this? I suppose I could write
an Access query that combines fields prior to pulling them into
InfoPath but I'd rather not clutter up my database with queries
specific to an InfoPath form.

Any other ideas?
 
S

scottchampion

I've got a drop down whose values are based on an access database
table. The access database table has the following columns:

ID, Description, Points

Currently, the values in the Description field populates the drop down
menu. I'd like the drop down to also display the values in the Points
field:

For example:

The database table contains:
ID, Description, Points
1, Happy, 2
2, Sad, 8
3, Elated, 1

Drop down displays:
Happy (2)
Sad (8)
Elated (1)

Can someone point me to a resource on this? I suppose I could write
an Access query that combines fields prior to pulling them into
InfoPath but I'd rather not clutter up my database with queries
specific to an InfoPath form.

Any other ideas?

It appears that I was able to concat these two columns in the SQL
query in InfoPath my doing the following:

Tools --> Data Connections
Modify the data connection associated with the drop down
I then edited the sql statement

SELECT tbl.ID, [tbl].[Description] & ' (' & [tbl].[Value] & ' points)'
AS Description
FROM tbl;

I received a warning stating that the SQL statement cannot be
represented as a tree view but everything seemed to work correctly.
Are there any draw backs to my configuration?
 

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

Top