K
Karen
I'm trying to develop a db whose primary purpose will be saving values for a report to be printed.
In the vein of being a relational devotee I have a Report Table, an Agency Table, an Agent Table. The Agent table saves the primary key of the Agency Table. On the Report form, I have a combobox with the Agencies and their indices; when an Agency is selected, another combobox is populated with the Agents from that Agency. The user selects an Agent and address and phone info from the Agent table is displayed. So in the structure is something like:
Report table
Report ID
fkAgencyID
fkAgentID
Agent Table
AgentID
fkAgencyID
In order to display the Agent info I was using DLookup but then I have to use DLookup on the form's current event otherwise nothing is displayed. I can get around this by showing the Agent data in a subform but that means I'll have lots of subforms on my Report form.
I'm beginning to think it would be better to save the Agent data in the Report Table, not just the key but that feels like one huge table----flat db instead of relational db. At the same time aligning the subforms is really a hassle. Do I take the high road and stick to the relational db or just give in and store the various fields in the Report table instead of the foreign keys.
In the vein of being a relational devotee I have a Report Table, an Agency Table, an Agent Table. The Agent table saves the primary key of the Agency Table. On the Report form, I have a combobox with the Agencies and their indices; when an Agency is selected, another combobox is populated with the Agents from that Agency. The user selects an Agent and address and phone info from the Agent table is displayed. So in the structure is something like:
Report table
Report ID
fkAgencyID
fkAgentID
Agent Table
AgentID
fkAgencyID
In order to display the Agent info I was using DLookup but then I have to use DLookup on the form's current event otherwise nothing is displayed. I can get around this by showing the Agent data in a subform but that means I'll have lots of subforms on my Report form.
I'm beginning to think it would be better to save the Agent data in the Report Table, not just the key but that feels like one huge table----flat db instead of relational db. At the same time aligning the subforms is really a hassle. Do I take the high road and stick to the relational db or just give in and store the various fields in the Report table instead of the foreign keys.