Combo Boxes that upon selection will display related data for user

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 5 different tables with the same fields in each table with different
data. All 5 tables are unrelated. I created a switchboard where if a user
clicks on a button (5 buttons for the 5 separate tables), it is connected to
a form with a combo box displayng data from a field from that particular
data. I do not know how to create the combo box, where the user will click
on the data they need and all information related to that data will be
populated.

Thanks,
HelpNeeded
 
Hi, Novice.

A combo box is most easily created using the Wizard. Enable the Wizard in
form design mode by toggling on the wizard button (a wand and stars) on the
Toolbox toolbar. If the Toolbox is not activated, activate it by View,
Toolbox. Then choose the combo box icon on the Toolbox toolbar, place it,
and drag it to approximate size. Follow the directions of the wizard.

There are two ways to do this.

COLUMN PROPERTY METHOD
Choose all the fields that you'd like to display on the form.

The wizard will set the cbox' chief properties:

RowSource
An SQL query statement

BoundColumn
The column that is stored in the control when a selection is made

ColumnWidths
The width to allocate to each column in the drop-down. If this is zero, it
does not display at all. Frequently, a combo box displays meaningful text
yet stores the invisible primary key.

ControlSource
The field in which the Bound Column will be stored.

To display another column in a textbox, set the textbox' ControlSource,
using the Column property of the combobox. The index of the first column is
0, the 2nd 1, etc.

=MyComboBox.Column(3) entered in a textbox' ControlSource will display the
4th column.

QUERY METHOD
Base your form on a query that includes the other fields from the other
table that you'd like to display, and the foreign key for the table
underlying the form.

Hope that helps.
Sprinks
 
Back
Top