Filter fields in form design - how?

G

Guest

Hello,

I am developing a mfg database and would like some suggestions on table
design:
At the main data entry form, users will select from a drop down list which
they can select whether it is a machine down issues, passdown entry,
attendent entry, etc.
I would like to form to enable all the fields that relate (tie) to the
selection entry and disable the fields that are not relate to the selected
fields.

1) should I create a separate table for each selection type (machine down,
passdown, etc), link them together by KeyID then put in macro (VB code) to
enable & disable the field?
2) Create all the fields that relate to the selection in one table, then in
the form design, write a macro so that say if machine down selection field is
selected, disable all fields not related to machine down. (or start off with
all the field (except selection field) disable from the beginning, then
enable fields that relate to selected field).

Thanks for any suggestion.
 
C

Carl Rapson

Cam said:
Hello,

I am developing a mfg database and would like some suggestions on table
design:
At the main data entry form, users will select from a drop down list which
they can select whether it is a machine down issues, passdown entry,
attendent entry, etc.
I would like to form to enable all the fields that relate (tie) to the
selection entry and disable the fields that are not relate to the selected
fields.

1) should I create a separate table for each selection type (machine down,
passdown, etc), link them together by KeyID then put in macro (VB code) to
enable & disable the field?
2) Create all the fields that relate to the selection in one table, then
in
the form design, write a macro so that say if machine down selection field
is
selected, disable all fields not related to machine down. (or start off
with
all the field (except selection field) disable from the beginning, then
enable fields that relate to selected field).

Thanks for any suggestion.

If each selection type requires different fields to describe it, you
probably don't want to store them all in one table, because for each record
a majority of the fields will be unused. It would be better to have a
separate table for each type. One thing you could do is place a tab control
on your form, and on each tab page place a subform based on a particular
table. Then, in the AfterUpdate event of the combo box, you can enable or
make visible only the tab page that contains the subform you need for that
selection.

If, on the other hand, most of the fields are common to all selection types
and there are only a few that don't apply, it would probably suffice to use
a single table. In the AfterUpdate event of the combo box, set the Visible
property of each control you want to see to True and the others to False.

Carl Rapson
 
G

Guest

I like the idea of separate table since most of the fields are different. But
how do I link (relationship) so I am able to filter out reports by date
ranges to show all the activities (data) for that date range?
 

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