add new record that updates appropriate tables

QUESTION:

I'm working with a database that was created by someone who no longer is with the company. We use it to keep track of our construction equipment and when it was serviced. We have a equipment table that has relationships with other tables based on the type of equipment. For example a Kobelco 350 would fall under the backhoe category(table) and a Ford F150 would fall under the trucks category(table).Is there a way to add a new record in the equipment table and have it append to the corresponding type of equipment? For instance, if I add an f150 and label it as trucks in the equipment table I want it to add the same info to the trucks table.

ANSWER:

From the little you've given it's possible to infer that tblCategory is a lookup table. A further inference is that "Category" is a field in tblEquippment. For ease of use, I would likely have used a combobox on the Equipment form to select the category when entering information for a new piece of equipment. The *only* times you need to add any data to tblCategory is when the category you need to show doesn't already exist in that table. In those cases, you can use the NotInList event to pop up a form on tblCategory to allow you to enter the new category. Simply adding a new piece of equipment which happens to be a truck should not require any action on tblCategory if the "truck" category already existed. If it doesn't work that way in your application you might post back giving detailed descriptions of your tables and their fields and maybe describe the connections you find in the Relationships window.


Google

Submit your comment or answer




Privacy Policy