Beginning Mileage...

S

Stephen

In my form i have Beginning Mileage, Ending Mileage, Total Daily Mileage. As
of now I have to enter Beginning Mileage, my Ending Mileage is =Nz([AR],0)+Nz
([LA],0)+Nz([TX],0)+Nz([MS],0)+Nz([OK],0)+Nz([Other])+[Beginning Mileage].
my Total Daily Mileage is =Nz([AR],0)+Nz([LA],0)+Nz([TX],0)+Nz([MS],0)+Nz([OK]
,0)+Nz([Other]). Is there a way that i can make my Beginning Mileage carry
over from the previous record (so i wouldnt have to manually enter it)?
Thanks

Stephen
 
S

Sprinks

Stephen,

One way would be to use the BeforeUpdate event of the form, which is
triggered by you attempting to leave the current record, to set the
DefaultValue property of [BeginningMileage]:

Me![BeginningMileage].DefaultValue = Me![EndingMileage]

Hope that helps.
Sprinks
 
S

Stephen

OK. I entered... Me![BeginningMileage].DefaultValue = Me![EndingMileage]
in the DefaultValue Property of Beginning Mileage. When i go to Form view in
the last record has #ERROR in the EndingMileage field and #NAME in the
BeginningMileage field? When I type in 20 (miles) in the AR field, 20 comes
up in the TotalDailyMileage field, 0 comes up in the BeginningMileage field
and 20 comes up in the EndingMileage field? Am I typing the right thing in
the right place? Thanks.


Sprinks said:
Stephen,

One way would be to use the BeforeUpdate event of the form, which is
triggered by you attempting to leave the current record, to set the
DefaultValue property of [BeginningMileage]:

Me![BeginningMileage].DefaultValue = Me![EndingMileage]

Hope that helps.
Sprinks


Stephen said:
In my form i have Beginning Mileage, Ending Mileage, Total Daily Mileage. As
of now I have to enter Beginning Mileage, my Ending Mileage is =Nz([AR],0)+Nz
([LA],0)+Nz([TX],0)+Nz([MS],0)+Nz([OK],0)+Nz([Other])+[Beginning Mileage].
my Total Daily Mileage is =Nz([AR],0)+Nz([LA],0)+Nz([TX],0)+Nz([MS],0)+Nz([OK]
,0)+Nz([Other]). Is there a way that i can make my Beginning Mileage carry
over from the previous record (so i wouldnt have to manually enter it)?
Thanks

Stephen
 
S

Stephen

OK. I entered... Me![BeginningMileage].DefaultValue = Me![EndingMileage]
in the DefaultValue Property of Beginning Mileage. When i go to Form view in
the last record has #ERROR in the EndingMileage field and #NAME in the
BeginningMileage field? When I type in 20 (miles) in the AR field, 20 comes
up in the TotalDailyMileage field, 0 comes up in the BeginningMileage field
and 20 comes up in the EndingMileage field? Am I typing the right thing in
the right place? Thanks.


Sprinks said:
Stephen,

One way would be to use the BeforeUpdate event of the form, which is
triggered by you attempting to leave the current record, to set the
DefaultValue property of [BeginningMileage]:

Me![BeginningMileage].DefaultValue = Me![EndingMileage]

Hope that helps.
Sprinks


Stephen said:
In my form i have Beginning Mileage, Ending Mileage, Total Daily Mileage. As
of now I have to enter Beginning Mileage, my Ending Mileage is =Nz([AR],0)+Nz
([LA],0)+Nz([TX],0)+Nz([MS],0)+Nz([OK],0)+Nz([Other])+[Beginning Mileage].
my Total Daily Mileage is =Nz([AR],0)+Nz([LA],0)+Nz([TX],0)+Nz([MS],0)+Nz([OK]
,0)+Nz([Other]). Is there a way that i can make my Beginning Mileage carry
over from the previous record (so i wouldnt have to manually enter it)?
Thanks

Stephen
 
Top