Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

Beginning Mileage...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen - 11 May 2007 19:59 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.