Page 1 of 1

Using a List box to populate multiple form fields.

Posted: Tue Apr 05, 2011 5:56 pm
by Russ_Martinson
Using a List box to populate multiple form fields.

I have created a a database and data entry form to track Service Calls. I am currently adding; “office number”, “office leader”, and “phone” each with a list box entry which is working, however I would like to just select the “office number” and have the “office leader” and “phone” fields for the selected “office number” automatically populate the form Fields from the list box using some type of table look-up. Or, how do I populate 3 fields with a single listbox selection.

Thanks,
Russ Martinson

Re: Using a List box to populate multiple form fields.

Posted: Tue Apr 05, 2011 7:18 pm
by Arineckaig
I would like to just select the “office number” and have the “office leader” and “phone” fields for the selected “office number” automatically populate the form Fields
Welcome to the forum.

This is likely to be best handled by applying the underlying principles of a Relational Database. The content of your “office leader” and “phone” fields appear to be dependent on the “office number” field. This data could therefore be stored in a separate table whose 'primary key' is linked to a 'foreign key' in your main table that could well be a list box.

I would refer you either to an introduction explanation at:
http://en.wikipedia.org/wiki/Relational_database
or an excellent but longer tutorial that can be downloaded from:
http://openoffice.org/projects/document ... 20tutorial

Re: Using a List box to populate multiple form fields.

Posted: Tue Apr 05, 2011 7:29 pm
by RPG
Hello

I don't know if I understand your question correct?. I understand you have one table with one foreign key. You can select the value with a listbox. When make three listboxes and use the datafield but use an other query for displaying a value, I think it can work in the way you want. The new values are shown when the chosen value is stored.

Romke