Populate Text box from Access db bound drop down list box

E

ejcross

I am attempting to design a form and am new to InfoPath 2003. I have a
drop-down list box that pulls the data from an Access 2003 db. The db has 3
tables called 'Members', 'FFN' and 'FIN'. The drop-down list box is pulling
the name properly from the 'Members' table, but I want it to populate a text
box with the 'FFN' number automatically when the correct name is selected.

Right now, it is pulling the first number no matter what is selected in the
name field. All tables have a common primary key, which is basically an
employee ID number.

This is not on a repeating table, but I am planning on duplicating the
fields on each line (approximately 30 lines) for multiple entries on the
form. Not sure if there is an easier way to accomplish this also.

Thanks in advance for the help!
 
S

S.Y.M. Wong-A-Ton

Try these steps:
- Add secondary data connections for the Members and FFN tables to your
InfoPath form
- Bind your dropdown to the Members table and choose employeeID as the value
for the drop-down
- Double-click on the Members dropdown to open its properties dialog
- Click on the [Rules...] button and click on the [Add] button to add a rule
- Click on the [Add Action...] button
- Select "Set a field's value" from the Action dropdown
- Click on the "select a field or group" button next to the "Field:" textbox
- Select the field (from the main data source) corresponding to the FFN text
box
- Click on [OK]
- Click on the Formula button beside the "Value:" textbox
- In the "Insert Formula" dialog: Click on the [Insert Field or Group...]
button
- Select the data source for your FFN table from the Data source
dropdown
- Expand the tree with the fields in the data source and select the field
you would like to display in the FFN textbox
- Click on the [Filter Data...] button
- Click on the [Add...] button in the Filter Data dialog box
- Select employeeID from the first dropdown on the Specify Filter Conditions
dialog box
- Leave "is equal to" selected in the second dropdown
- Select "Select a field or group..." from the third dropdown
- Select the Main data source from the Data source dropdown in the "Select a
Field
or Group" dialog
- Select the field from the Main data source fields that corresponds to the
dropdown on your InfoPath form
- Click on [OK] to close all dialog boxes.
 
N

Nambi

Ejcross Were you able to get this to work?? I am completely confused with
Infopath as i find it very unuser friendly. I am trying to accomplish the
same thing you are and I am having the same problems, my drop down box lists
my contents yet when I summit the query the only information that is pulled
is the first list and I can't populate the text fields.

I have 2 tables each table shares a common key and each table has about 15
columns of data, I want to have either a drop down box with the key and
depending on which key is entered or drooped down the text boxes associated
will populate with the proper data. I tried to follow directions below but
I get confused form the start.

1) add a secondary data connection - if I have 1 database consisting of 2
tables which are bound by a common key, why would I add a secondary
datasource. Should I add the single table as one data source then the other
table as a second data source? or should I have one access file with the two
tables in?

2) Bind the tables (I cant' they are grayed out)

3) When adding the controls (drop down box) do I add a query field or a data
field

4) do I set the rules for the key (drop down box) or do I set the rules for
the text boxes that will populate when the key is selected?

Lots of questions but if I get past here I think I can manage.





S.Y.M. Wong-A-Ton said:
Try these steps:
- Add secondary data connections for the Members and FFN tables to your
InfoPath form
- Bind your dropdown to the Members table and choose employeeID as the value
for the drop-down
- Double-click on the Members dropdown to open its properties dialog
- Click on the [Rules...] button and click on the [Add] button to add a rule
- Click on the [Add Action...] button
- Select "Set a field's value" from the Action dropdown
- Click on the "select a field or group" button next to the "Field:" textbox
- Select the field (from the main data source) corresponding to the FFN text
box
- Click on [OK]
- Click on the Formula button beside the "Value:" textbox
- In the "Insert Formula" dialog: Click on the [Insert Field or Group...]
button
- Select the data source for your FFN table from the Data source
dropdown
- Expand the tree with the fields in the data source and select the field
you would like to display in the FFN textbox
- Click on the [Filter Data...] button
- Click on the [Add...] button in the Filter Data dialog box
- Select employeeID from the first dropdown on the Specify Filter Conditions
dialog box
- Leave "is equal to" selected in the second dropdown
- Select "Select a field or group..." from the third dropdown
- Select the Main data source from the Data source dropdown in the "Select a
Field
or Group" dialog
- Select the field from the Main data source fields that corresponds to the
dropdown on your InfoPath form
- Click on [OK] to close all dialog boxes.
---
S.Y.M. Wong-A-Ton


ejcross said:
I am attempting to design a form and am new to InfoPath 2003. I have a
drop-down list box that pulls the data from an Access 2003 db. The db has 3
tables called 'Members', 'FFN' and 'FIN'. The drop-down list box is pulling
the name properly from the 'Members' table, but I want it to populate a text
box with the 'FFN' number automatically when the correct name is selected.

Right now, it is pulling the first number no matter what is selected in the
name field. All tables have a common primary key, which is basically an
employee ID number.

This is not on a repeating table, but I am planning on duplicating the
fields on each line (approximately 30 lines) for multiple entries on the
form. Not sure if there is an easier way to accomplish this also.

Thanks in advance for the help!
 

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