I
iwasinnihon
I need to update a field in a table based on information found in a
listbox on a form. This in itself sounds easy. However, it gets a
little complex. Allow me to elaborate.
Table1 has fields ID, title, LicenseCount. ID is the key
Table2 has fields Inv, Type, Location. Inv is the key
Table3 has fields ID, Inv, DateAssigned. ID and Inv are the keys from
Table1 and Table2
If a row from Table2 is deleted the following needs to happen
1) for every row in Table3 that has the Inv from the row that will be
deleted, the LicenseCount from Table1 for the corresponding ID from
Table3 needs to incremented by 1.
2) every row in Table3 that has the Inv from the row that will be
deleted needs to be deleted
3) The row in Table2 needs to be deleted.
I am fine with 2 and 3. It is number 1 that is causing me trouble.
Any ideas on how to accomplish number 1?
listbox on a form. This in itself sounds easy. However, it gets a
little complex. Allow me to elaborate.
Table1 has fields ID, title, LicenseCount. ID is the key
Table2 has fields Inv, Type, Location. Inv is the key
Table3 has fields ID, Inv, DateAssigned. ID and Inv are the keys from
Table1 and Table2
If a row from Table2 is deleted the following needs to happen
1) for every row in Table3 that has the Inv from the row that will be
deleted, the LicenseCount from Table1 for the corresponding ID from
Table3 needs to incremented by 1.
2) every row in Table3 that has the Inv from the row that will be
deleted needs to be deleted
3) The row in Table2 needs to be deleted.
I am fine with 2 and 3. It is number 1 that is causing me trouble.
Any ideas on how to accomplish number 1?