473,672 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Need an error trap for Date/Milage

"Tony Toews [MVP]" <tt****@teluspl anet.netreplied in message
news:g0******** *************** *********@4ax.c om...
>
If you have any such you will need to also consider hours accumulated
which,
for example, bulldozers do.
Tony, I did one of these recently, and asked the client, "Could there ever
be a case where you need to store both (i.e. hours of operation and miles
travelled)? The answer was no, so we just called the field MeterReading
(Double), and added a MeterTypeID field to the VehicleType table.

The real fun comes when you have to project anticipated servicing dates
based on current usage trends, where service is required every xx
hours/miles or xx months/days whichever comes first, particularly if
servicing is component-based (some components are different to others)
and/or tiered (e.g. the A service includes all requirements of the B
service.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

Oct 13 '08 #1
3 1356
"Allen Browne" <Al*********@Se eSig.Invalidwro te:
>If you have any such you will need to also consider hours accumulated
which,
for example, bulldozers do.

Tony, I did one of these recently, and asked the client, "Could there ever
be a case where you need to store both (i.e. hours of operation and miles
travelled)? The answer was no, so we just called the field MeterReading
(Double), and added a MeterTypeID field to the VehicleType table.
Double? That's a big extravagent. <smile>

However there can be case where a truck, that spends both a great deal of time
driving and a great deal of time providing hydraulic or pumping power where the next
service depends on either miles/kms or hours. A bad example would be a firetruck
although they typically don't drive much and spend a lot of time on scene pumping
water. A good example might be a underground boring machine on the back of a truck
which drives many hundreds of kms to it's next stop but spends hours providing
hydraulics and power to the boring machine.

Then there are situations where there's another motor on the same machine. For
example a large truck or front end loader mounted snowblower with one motore for the
drive axles and another motore for the snow blower. But for those few situations
the user just creates two units. Especially if it's a snow blower on a front end
loader which could be mounted on different loaders from year to year.
>The real fun comes when you have to project anticipated servicing dates
based on current usage trends, where service is required every xx
hours/miles or xx months/days whichever comes first, particularly if
servicing is component-based (some components are different to others)
and/or tiered (e.g. the A service includes all requirements of the B
service.)
Oh yes. And I'm not going to get into projecting anticipated dates for now. It can
very too much up here what with winter being a major factor. The bulldozers have
been running 12 hours a day since May and will be shutting down in another few or
four weeks in this area. At peak times the service intervals may only be 10 to 20
days apart and then you get rained out for a week.

I will be giving them the ability to
1) easily locate the units for they which haven't received a odometer or hour meter
reading in some time
2) print a report by unit type with underlines so a gofer (person who "goes for" this
and that.) can go around to the units and write down the readings and a simple means
of entering that data.
3) reminders when they are approaching or have exceeded the various service intervals
such as, in gasoline motors, the timing chan.

One amusing anecdote as the the New York ambulance doesn't bother scheduling major
maintenance on their ambulances. They are, on average, in a major accident every 18
months and written off.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Oct 13 '08 #2
"Tony Toews [MVP]" <tt****@teluspl anet.netwrote:
>so we just called the field MeterReading
>>(Double), and added a MeterTypeID field to the VehicleType table.

Double? That's a big extravagent. <smile>
Actually maybe not. While unlikely a Single would only take you up to 3,402,823 kms
so that's certainly possible.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Oct 13 '08 #3
I rarely use single anyway. Even for calculating fractions of an hour, the
inaccuracies are cumulative.

As per your other reply, the scenarios are always fun.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tony Toews [MVP]" <tt****@teluspl anet.netwrote in message
news:0e******** *************** *********@4ax.c om...
"Tony Toews [MVP]" <tt****@teluspl anet.netwrote:
>>so we just called the field MeterReading
>>>(Double), and added a MeterTypeID field to the VehicleType table.

Double? That's a big extravagent. <smile>

Actually maybe not. While unlikely a Single would only take you up to
3,402,823 kms
so that's certainly possible.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Oct 14 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2835
by: will | last post by:
All I am trying to pass a simple xml file using xmlspy : <?xml version="1.0" standalone="no"?> <inventory> <vehicle> <make>Chevy</make>
10
2434
by: Mike D | last post by:
I have a table in SQL 2000 with a composite Primary Key on coulumns Instrument_ID (int) and WeekOf (smalldatetime.) I am running asp on win 2003. I insert values using a stored procedure from this ASP: InsertSQL = "Execute osp_insert_Instrument_Schedule " InsertSQL = InsertSQL & "@UserName = '" & strUserName & "', " InsertSQL = InsertSQL & "@DateInput = '" & Date() & "', " InsertSQL = InsertSQL & "@Instrument_ID = " & strInstrument_ID &...
1
2069
by: Jill | last post by:
I am trying to store the current date to an ms access database on my server. I set it up with a dsnless connection. Here is the statement: Insert Into employees(timestamp) Values ('" & date() & "')" the timestamp field is of type date/time in the ms access database. I get an error saying the insert statement is invalid. Cannot get you the exact error, my server is down. But it seems that the syntax is correct.
3
1664
by: Jeremy | last post by:
I am creating a form that a person enters a date span in yyyymm form. I want a box to pop up that tells the user "Please enter date in correct format" if the user has entered the data incorrect. I have entered the input mask and the auto tab order. I have done this before, but I cannot remember the syntax for the code to pop up the error box. Please help.
14
3884
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the maxRequestLength parameter of the <httpRuntime> section and that works as expected. What I want is to enforce a max file size but haven't been able to trap the error thrown when the file is too large and that's where I could use some help.
2
4434
by: Keith Kowalski | last post by:
I anm opening up a text file reading the lines of the file that refer to a tif image in that file, If the tif image does not exist I need it to send an email stating that the file doesn't exist then skip this file and move onto the next file (line). If file is there then move to a sirectory. Here is the code I have (Feel free to make corrections as needed. If possible make changes in red)
3
2069
by: Chozomaster747 | last post by:
I'm in my last week in High School and my last program has seemed to have been shot. My teacher blames it on the computers and says that my program should run, but I have an error opening my files. This is my header: --------------------------------------------------------------------------- #include<iostream.h> #include<string.h> #include<fstream.h> #include<IO.h> struct carinfo { char vehicle,manu,model;
8
2451
by: sara | last post by:
I have a report that runs fine with data. If there is no data, I have its NO Data event sending a MsgBox and cancelling the report. Then it seems I still get the 2501 message on the Open Report command, even though I have the code to trap Err 2501 (from many postings - all looked the same to me) on the button the user pressed to get the report. I never see the code going to my error handling on the button. If I debug, I am in an...
8
1815
by: MLH | last post by:
Sometimes it works and sometimes it crashes. If I want "Today is " & Date$ & "." to appear in a query field, why might it work sometimes and not others? Would I be better to call a FN? Say, something like "Today is " & GetDateString() & "." ??? If 'Yes' - why is that?
0
8423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8947
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8699
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4245
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2844
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2097
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1842
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.