Dynamically create subforms

R

rstoffiere

Hello all! I have a need to dynamically create subforms on a main form

as follows:


My database is used to audit legal bills against client's litigation
guidelines. It is written in MSAccess on a MYSQL backend. Each
individual guideline item is entered into a table (tblLMGItem). There
could be any number of entries depending on the individual client.
When the user selects to audit a particular bill, the app runs queries
against the billing data to pull out the most likely results for each
guideline item. I have a simple subform that is used to display the
potential matches for each guideline item (configured to display as a
Continuous Form). The user can then look through the results for each
guideline item and set a selection field for the one entry that
actually meets the criteria for that guideline item.


Right now, I have a main form with a separate subform for each possible

guideline item. This works fine as it is. However, if the client adds

a new guideline item, or removes an existing item, the form needs to be

reprogrammed to acommodate these changes. Is there any way I can have
the subforms dynamically generated based on the number/type of actual
guideline items?


I appreciate any help I can get. Thanks so very much!!!
 
A

Allen Browne

Creating interface on the fly is a highly undesirable way to design a
database.

The data structure needs to be redesigned so that it copes with the
different kinds of items that you will need. It is always possible to
redesign the data structure, so that you have a field to handle the
attribute types and a field to handle the value rather than heaps of
individual fields to handle each attribute of your entity.

For suggestions and examples of how to design generically, see:
http://www.databaseanswers.org/data_models/index.htm
Search the page for "generic", and see how the suggestions work.
 

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