A
Arvi Laanemets
Hi
Seemingly my head is somewhat dull today (because I have a cold maybe?), and
I can't find good solution.
I have a contionous form, where some data about usage of cars is registered.
The form is based on some table, let's it be tblUsage, with fields UsageID,
CarID, UsageDateTime, ..., Distance.
Then I have a table tblFix with fields FixID, CarID, FixDate, ...,
Spidometer0, where for every car is at least one row, and where some
parameters like car spidometer values for freely selected dates are stored -
it's assumed that the stored values correspond to 00:00:00 of this date.
I need on form an unbound textbox, where for every record, the spidometer
value for this date is calculated, based on latest Spidometer0 in tblFix for
this car and UsageDate (max fixdate for
tblUsage.UsageDateTime>=tblFix.FixDate And tblUsage.CarID=tblFix.CarID), as
sum of Spidometer0 and sum of distances from FixDate until UsageDateTime for
this car. As I need this in contionous form, I can't use saved queries. And
the calculated value must include latest changes in form's Distance textbox
too.
Is such calculation possible?
Thanks in advance for help!
Arvi Laanemets
Seemingly my head is somewhat dull today (because I have a cold maybe?), and
I can't find good solution.
I have a contionous form, where some data about usage of cars is registered.
The form is based on some table, let's it be tblUsage, with fields UsageID,
CarID, UsageDateTime, ..., Distance.
Then I have a table tblFix with fields FixID, CarID, FixDate, ...,
Spidometer0, where for every car is at least one row, and where some
parameters like car spidometer values for freely selected dates are stored -
it's assumed that the stored values correspond to 00:00:00 of this date.
I need on form an unbound textbox, where for every record, the spidometer
value for this date is calculated, based on latest Spidometer0 in tblFix for
this car and UsageDate (max fixdate for
tblUsage.UsageDateTime>=tblFix.FixDate And tblUsage.CarID=tblFix.CarID), as
sum of Spidometer0 and sum of distances from FixDate until UsageDateTime for
this car. As I need this in contionous form, I can't use saved queries. And
the calculated value must include latest changes in form's Distance textbox
too.
Is such calculation possible?
Thanks in advance for help!
Arvi Laanemets