I need help with making a calculation on a subform.
I currently have a database setup which tracks the attachment height of equipment
attached to utility poles. There are two tables included in the database. One called Pole_Data which contains information about each pole and another called Epuip_Data which contains info about attached equipment including its attachemt height (field name "Height"
.
There is a one to many relationship between the pole data table and the equipment data table linked through a field named Pole_ID.
I have created a main form linked to the Pole_Data table and placed a subform on it linked to the Equip_Data table. As I navigate the records on the main form, the subform shows the corresponding equipment on each pole.
My problem is that I need to calculate the distance between each piece of equipment on the pole. In order to do this, I first need to sort the heights by decending order, which I have done. Next It seems like I need to be able to reference each record on the subform by its "row" so that I can subtract the height value in one record from
the height value in the adjacent record and return the results to a control on the subform. I can not figure out how to do this. Any ideas would be appreciated.
I currently have a database setup which tracks the attachment height of equipment
attached to utility poles. There are two tables included in the database. One called Pole_Data which contains information about each pole and another called Epuip_Data which contains info about attached equipment including its attachemt height (field name "Height"
There is a one to many relationship between the pole data table and the equipment data table linked through a field named Pole_ID.
I have created a main form linked to the Pole_Data table and placed a subform on it linked to the Equip_Data table. As I navigate the records on the main form, the subform shows the corresponding equipment on each pole.
My problem is that I need to calculate the distance between each piece of equipment on the pole. In order to do this, I first need to sort the heights by decending order, which I have done. Next It seems like I need to be able to reference each record on the subform by its "row" so that I can subtract the height value in one record from
the height value in the adjacent record and return the results to a control on the subform. I can not figure out how to do this. Any ideas would be appreciated.