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
Sprinks - 11 May 2007 20:59 GMT
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
> 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
[quoted text clipped - 5 lines]
>
> Stephen
Stephen - 11 May 2007 21:13 GMT
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.
> Stephen,
>
[quoted text clipped - 16 lines]
> >
> > Stephen
Stephen - 14 May 2007 20:12 GMT
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.
> Stephen,
>
[quoted text clipped - 16 lines]
> >
> > Stephen
Wayne-I-M - 11 May 2007 21:00 GMT
Hi
Re-read the answer you got to this question from Andy 2 days ago and I think
Allen Brown's article may also be of help
http://allenbrowne.com/subquery-01.html#AnotherRecord

Signature
Wayne
Manchester, England.
> 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
[quoted text clipped - 5 lines]
>
> Stephen