Display the contents of multiple fields in one control

B

Burhan

I want to dislpay 2 fields from a SQL database connection table in one
DropDown List box (Ex. DeptCode+DeptName) to facilitate the users in making
the selections and to update the EmpDeptCode field in my local database based
on the selection which is the DeptCode from the SQL db table.

Thanks
 
S

Steve

DropDownList controls only bind to one field at a time. Perhaps you could
create a concatenated field in your data source and use that to bind to?
Updating the EmpDeptCode based on this might be a little trickier. Hmm, time
to experiment...
 
B

Burhan

Dear Steve,

Many Thanks for your advice, as I am not a SQL programmer would you help me
in creating the concatenated field in the sata source by some examples and
use that in Infopath DropDown list.

Best Regards
Burhan
 
S

Steve

OK, I'm not either but we'll give it a go.If we mess it up too badly, the
SQL-savvy folks won't be able to stand it and will jump in with a solution.
;-)

What are the data types of the two fields (DeptCode and DeptName)? I assume
that the name is text but the other may be a number. Also, what is the name
of the table that it is stored in?
 
B

Burhan

DeptCode type is Whole Number and DeptName is Text, Dept_Master is the name
ot the SQL Table.

FYI
 

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