Hello,
I have created a database to track the flights on three aircraft owned by the flight school I manage. The relevant fields in the FlightRecords table are Date, AircraftID, HourMeterOut, and HourMeterIn. [HourMeterIn] - [HourMeterOut] = TotalFlightTime .
Each month I generate a report that calculates the total flight time for each aircraft. That report calls a Dialog box which has BeginDate and EndDate, BeginHourMeter (which is the first HourMeterOut value for the first day of the month) and EndHourMeter (which is the last HourMeterIn for the last day of the month.
What I would like to do is have the default value of the BeginHourMeter txtBox lookup the first HourMeterOut time for the last month. And the EndHourMeter txtBox lookup the last HourMeterIn time for the last month. I have already figured out how to make the BeginDate and EndDate get the previous month with DateSerial().
Are there any suggestions? I have experimented with DLookup() but to no avail.
Thanks in advance,
Steve
I have created a database to track the flights on three aircraft owned by the flight school I manage. The relevant fields in the FlightRecords table are Date, AircraftID, HourMeterOut, and HourMeterIn. [HourMeterIn] - [HourMeterOut] = TotalFlightTime .
Each month I generate a report that calculates the total flight time for each aircraft. That report calls a Dialog box which has BeginDate and EndDate, BeginHourMeter (which is the first HourMeterOut value for the first day of the month) and EndHourMeter (which is the last HourMeterIn for the last day of the month.
What I would like to do is have the default value of the BeginHourMeter txtBox lookup the first HourMeterOut time for the last month. And the EndHourMeter txtBox lookup the last HourMeterIn time for the last month. I have already figured out how to make the BeginDate and EndDate get the previous month with DateSerial().
Are there any suggestions? I have experimented with DLookup() but to no avail.
Thanks in advance,
Steve
Comment