473,395 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Sum of fields by date

Good day everyone

I have tried to do the following, and if any can help give guidance it would really be appreciated:

I have a Form where I input details of a vehicle test by date.

e.g.

01 July 2007 , Route 1 , 50km
02 July 2007 , Route 1 , 50km

where the date and distances are in individual text boxes in a third box I have the total distance added = 100km's.

However, sometimes a vehicle will do two different routes on the same day

e.g.
03 July 2007, Route 1 , 50km
03 July 2007, Route 2 , 75km

Now total distance = 225km's

But, in a fourth text box I would like to have the distance covered for the day
e.g. 03 July 2007, Route 1 + Route 2 = 125km's.

It is this final step that I cannot get right. How do I add the two distances based on the same date?

Thanks for your help.

Howard
Jul 5 '07 #1
2 1279
Im hoping that Im on the right track to help here as I.m assuming some points

first teh assumptions

You have a flat file database and not a relational

The system you require needs a relational.

The vehicle requires a specific identifier - registration vehicle number (UK) Tag number USA. both these are best used in theri own situation.

The one table carries the vehicle ID and the routes, dates and distances are set in another table ID tabe (1 to many) Routes table

You can then set up the a form to enter the veicle ID and in a subform the details of the dates , distance routes.

On the main form then have it sum up the distance for the vehicle on a certain date

Gareth
Jul 6 '07 #2
Im hoping that Im on the right track to help here as I.m assuming some points

first teh assumptions

You have a flat file database and not a relational

The system you require needs a relational.

The vehicle requires a specific identifier - registration vehicle number (UK) Tag number USA. both these are best used in theri own situation.

The one table carries the vehicle ID and the routes, dates and distances are set in another table ID tabe (1 to many) Routes table

You can then set up the a form to enter the veicle ID and in a subform the details of the dates , distance routes.

On the main form then have it sum up the distance for the vehicle on a certain date

Gareth

Hi Gareth

Thanks for the response, I was trying to get arround setting up the database that way, the only problem is that at the moment it is already a sub-form, and as far as I know you can't have a subform in a subform. So I will have to tackle this from another angle.

Thanks

Howard
Jul 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: allyn44 | last post by:
Hello, I have a table that has null fields that need to be filled in with the value of the previous record (example below) id date 1 2/2/02 2 3 4/4/02 4
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
8
by: Ragbrai | last post by:
Howdy All, I have a query that is used for filtering results to be used in a combo box. The query needs to test fields from both a table and then unbound text boxes on the form that also contains...
3
Jerry911
by: Jerry911 | last post by:
I have a form that uses a pick list to select a specified date/time range based on the case value. Case 1-7 have pre-defined date/time functions, but case 8 is for a custom date/time range. I only...
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.