October 5, 201312 yr Hey guys, I have a layout called "Aircraft Hours" where I enter in details for an aircrafts flight. The field I am interested in this one is [date]. I have another layout called "Maintenance" where the maintenance for the aircraft show up. I wish to have this layout display the last time that aircraft flew. I am new to this kind of stuff. I am using from what I have read I need to use the 'lookup' function but I am guessing I need an "IF" function as well? I want the calculation to look up the last record entered on the "Aircraft Hours" layout and grab the date from the date field however I need the aircraft field to match on both layouts. The "Aircraft Hours" layout will have records for all different aircraft. I need the calculation to not only look up the last entries date but last entries date for the correct aircraft. Gosh I hope that makes some sense... Cheers!
October 5, 201312 yr You need 2 tables, one for aircafts and one for maintenance linked together. see attached aircraft.zip
October 5, 201312 yr Author Thanks mate. I do have two tables. One "Aircraft Hours" and one "Maintenance". Aircraft Hours - Stores entries for different aircraft. ------------------ [Aircraft] [Date] [etc etc] Maintenance ----------------- [Aircraft] [Date] (I want this date field to search for the last entered record on the air hours table and enter it into the date field here. However this date being entered must be for the aircraft displayed on the maintenance table.)
October 5, 201312 yr Solution You can relate Aircraft Hours and Maintenance by matching Aircraft to Aircraft, sort the Aircraft Hours TO descending by date and just look at the date from the first record via that relationship (which is the most recent date), i.e. put in on the Maintenance layout. What you apparently don't have, but should, is a table Aircrafts, with a unique ID for every aircraft. Then each entry in those two other tables can relate to one Aircraft record, and records belonging to the same aircraft will have the same foreign AircraftID.
Create an account or sign in to comment