Forms :: Calculate Distance Between Two Addresses
May 3, 2013
I am using Access 2010 and am developing a form where the user provides a full address - street number, street name, city, province and postal code.
I want a control to calculate the distance from this address and a fixed address.
View Replies
ADVERTISEMENT
Sep 28, 2013
However Instead of entering the postal code continually or selecting from the combo box. How do I set zipcode 1 and zipcode 2 based on fields in a form. I would like to use the current FROM (Default zip based on the current job in form) and TO zipcode [Project Postal Code] that is on the form at that time. Not necessarily combo box.
Currently you have
zip1 = Me.Combo2.Value
zip2 = Me.Combo4.Value
I want Zip 1 to be Default zip (however I can still change it if needed) ZipCode field is [Project Postal Code]
Here is the full code:
Private Sub Command6_Click()
Dim zip1 As String, zip2 As String
Dim sResponse As String
Dim sLink As String
On Error GoTo Command6_Click_Error
zip1 = Me.Combo2.Value
[code]....
View 1 Replies
View Related
Aug 19, 2007
Dear All:
I have a problem in calculating distance's mileage.Eg: Distance from town A to town B is 10km, town A to town C is 20km and vice versa. I have a table named "Location" as per below:-
Town From , Town To , Distance
A , B , 10km
A , C , 20km
A , D , 30km
B , A , 10km
C , A , 20km
D , A , 30km
My question now is: if there are 26 locations, (Eg: A - Z), then I need to key in the distance one by one and it is very tedious. Because Town A to Town B is 10km and Town B to Town A also 10km.
Is there any method that Access will consider A to B and B to A is same distance?
Can we use crosstab to calculate?? and what is the step?
Pls help & thanks in advanced.
View 2 Replies
View Related
Aug 22, 2006
I would like to have a back-end Database on a host server and link a
front-end Database to the tables several hundred miles away. The problem is I have no experience whatsoever in doing this.
My questions are:
(1) Can tables be linked via the Internet?
(2) If they can, is this the best way to link the tables?
(3) If it is possible to link the tables by the internet or by some other way; how do I do it?
I really would appreciate any help you can give.
Kind regards
Eddie
View 1 Replies
View Related
Jun 22, 2007
I am trying to create a query that gives me a cummulative distance based on a previous footages. For example I am prompting the user to enter a Route. Along the route are several points having a numeric value. Each of these points along the route have a footage accociated to the previous point. I want the query to display the Route, each point along the route based on the users defined start and end point, show each backspan footage and provide a cummulative distance based on the progression of the route. Below is what I have created so far. Now I want to add a cummulative distance.
SELECT PED.ROUTE_1, PED.TERMINAL_1, PED.TERMINAL_1, Sum(PED.BACKSPAN_1) AS SumOfBACKSPAN_1
FROM PED
GROUP BY PED.ROUTE_1, PED.TERMINAL_1, PED.TERMINAL_1
HAVING (((PED.ROUTE_1)=[ enter route ]) AND ((PED.TERMINAL_1)>[enter start]) AND ((PED.TERMINAL_1)<[enter end]));
Thanks for any help.
View 2 Replies
View Related
May 3, 2014
Before I design an application in Access, I need to know if a certain task is even possible. I have a table of Physicians containing their names and addresses. What I would like to accomplish is to be able to provide an entry screen that would allow a user to input their zip code and have Access search for the physicians with a
1) 5 mile radius
2) 10 mile radius, etc.
Is this even possible within Access?
View 2 Replies
View Related
Mar 8, 2015
I use Access 2003 and want to make a query by specifying the start and finish within the city, I send files. a
Attached file ...
View 1 Replies
View Related
Aug 12, 2013
I have a database of spare parts and I want to calculate the price of the whole warehouse.I have managed to do [quantity]*[price] in a subform but now I want to sum all and show the result in textbox.
View 11 Replies
View Related
Jan 24, 2015
I have a problem with calculating sum of fields in the footer of subform
The subform consists of following 5 fields
Opis kolicina txtCena rabat CenaSpop
Opis is combobox (cbododatki), which takes values from another table (tbldodatki)
SELECT DISTINCT [IDdodatki], [Opis], [Cena] FROM tbldodatki ORDER BY [Opis];
Kolicina is enetered manually
Rabat is entered manually
Cena is calculated with =cbododatki.column(2)
Cenaspop is a calculation of [kolicina]*[txtCena]*(1-[rabat])
In such case i cant get Access to calculate the Sum in the footer of the subform
On the other hand, if i add an additional column to the source table (tblPodrobNaroc) of this subform (frmPodrobNaroc) where i enter Cena manually (instead of only being part of cbododatki), then all calculations are fine.
Which option do you reccomend, should i:
a) add to the source table of subform (tblPodrobNaroc) another column with values of Cena from tbldodatki (how is that done?), which would be filled in through cbododatki, and then perform needed calculations
b) call Cena in subform in such way that the Access recognizes it (not as cbododatki.column type) and performs the calculation.
View 14 Replies
View Related
Jul 25, 2014
I have looked all over for a way to calculate the difference between water meeter readings. My brain may be Friday slow, but all I can find is for calculating differences in dates. My water table has 3 fields: ReadDate, Reading, Calc1
ReadDate is the date the water reading occurred
Reading is the meter reading
Calc1 is calculated (when I find out how!) by subtracting the current reading from the previous day's reading.
I would like to add the write script in my form so when the readings are entered, the calculation auto populates the field for the user.
View 6 Replies
View Related
Apr 28, 2015
The problem that I am having is how to recalculate all order detail item.
FORM
Main form = Tblorder : orderID, CustumerID, TotalSquare
Sub form = TblOrderdetail : orderdetailID, OrderID, itemname, unitprice, total
Example: if I set up the totalsquare FIRST = 10 and I select the the itemname, it will calculate the total = unitprice * totalsquare this work fine.
I have 20 item in sub form orderdetail and every item was calculate based on totalsquare = 10. For some reason, I have to change the totalsquare = 20.
How do I make so that it will recalculate all 20 items in subform/orderdetail instead of deleting all item and re enter it again?
View 5 Replies
View Related
Feb 5, 2014
I am having trouble on the Work Orders Form to get the SubTotal to calculate correctly.
The SubTotal Control Source is:
Code:
=DLookUp("[Services Total]","[Services Total]","[WOrderID] = '" & [txtWOrderID] & "'")+DLookUp("[Parts Total]","[Parts Total]","[WOrderID] = '" & [txtWOrderID] & "'")
The Form Record Source is:
Code:
SELECT DISTINCT [Work Order].*, [Payment Total].[Payment Total], [Services Total].[Services Total], [Parts Total].[Parts Total] FROM (([Work Order] LEFT JOIN [Parts Total] ON [Work Order].WOrderID = [Parts Total].WOrderID) LEFT JOIN [Payment Total] ON [Work Order].WOrderID = [Payment Total].WOrderID) LEFT JOIN [Services Total] ON [Work Order].WOrderID = [Services Total].WOrderID;
why my form won't calculate totals?
View 2 Replies
View Related
Jul 18, 2013
I have a form with date fields I need to calculate review dates for employees. Example 45 day 60 day 90 day what would be the best option to do this?
View 1 Replies
View Related
Sep 20, 2014
Trying to calculate the integer difference between Due_Date and Result_Date excluding weekends and holidays.
I have a table (Holidays) with the dates of the holidays in it. The table looks like:
ID Description Holiday
1 New Years 1/1/2014
2 New Years 1/1/2015
So, if Date_Due: 9/25/2014 and Result_Date: 9/29/2014, then TAT = 2
Since 9/27/2014 and 9/28/2014 are weekends they are excluded from the calculation and only that Thursday and Friday are used in the calculation.
Code:
Private Sub Result_Date_AfterUpdate()
[TAT] = NETWORKDAYS(Due_Date, Result_Date, tblHolidays)
End Sub
View 7 Replies
View Related
Nov 20, 2014
I have a form, where one field is a combo box
The combo box is two columns linked to at table,
task and sla
You pick the task, and it displays the task
What i need is, another field, to equal the SLA part of that task.
View 5 Replies
View Related
Jan 30, 2014
I have a subform in which I want to calculate the difference between a start time and finish time, the problem I am having is when the start time is on a different date to the finish time
Start 23:15 on 14th Jan finish 00:015 on 15th Jan, also I want the answer to be the number of minutes. The fields I have are
BatchStartTime Short Time
BatchFinishTime Short Time
BoilTime ([BatchStartTime] - [BatchFinishTime]) General Number.
There are many batches to enter per job and the MainForm has the StartDate as I didn't want to enter the StartDate for each batch.
View 4 Replies
View Related
Nov 27, 2014
I am struggling with calculate difference between two query table values, I first created a make a table query(current meter reading) which contains one column called "meter read" , and I created a second make a table query(previous meter reading) which also contains "meter read" column, I linked those two make table queries to calculate the value difference between two date, how can I create a form to calculate diff between any two date?
View 3 Replies
View Related
Sep 6, 2005
we want to run a ping command via a radio button or command button. We have IP addresses set up for multiple pieces of equipment, each IP address consisting of 4 different text boxes. We want to be able to launch a ping and have the program read the values from each of the 4 text boxes that make up the IP address.
Any ideas/suggestions greatly appreciated.
View 14 Replies
View Related
Jul 8, 2015
I need to calculate the passed working days and show them in a form. I should be also able to use the number in a query later on. in excel I use the formula to get the days passed:
Code:
=IF(ISERROR(MATCH(F10,Dictionary!C:C,0)),NETWORKDAYS(D10, TODAY(), Dictionary!$E$2:$E$43),"Status Excluded")
D = "Date_uploaded" in access table "tbl_All_Cases"
F = "Status_Case" in access table "tbl_All_Cases"
c:c = dictionary case status
E:E = dictionary holidays
"Status Excluded" will show up in the cell if a case has one of the status from the dictionary..I created a table: tbl_Dictionary where there are 2 fields: "Case_Status" and "Holidays".How can I translate the above formula into something that access will understand?
View 14 Replies
View Related
Feb 28, 2007
How can I sort string addresses so as to get the correct number order? I know that strings sort on each character, which causes the problem. I have tried some things (with VAL and Len), but was not completely successful. I do not want to enter an address number as 0630, when I want 630.
Why does this not work:IIf(Len(Str(Val([address]))=3),"0" & [address],[address])? Address has 3 and 4 numbers only.
View 2 Replies
View Related
Apr 11, 2005
I am currently designing a contacts database for my business and need some advice on how to store addresses.
As I see it, I can either use a single field and carriage returns, or multiple fields which for some records may leave some blank fields.
The data will be used to perform mailmerges and will also be output to a contacts directory and I would be looking to display the address both horizontally and vertically. Is there a simple way of manipulating a multi line field so that it can be displayed on a form across the page on one line in a report?
View 2 Replies
View Related
Jun 10, 2005
Hi.
I have an Access 2000 database running on Windows 2000 Operating System. The database is on a shared drive on a network with approx 20 concurrent users. It runs a bit sluggishly so I am looking for ways to speed things up. The network guys say that the bit rate is OK so I need to tweak the database. I have run the performance and table analysers and get no suggestions for improvement. However, I have spotted a potential problem with the way addresses are stored.
Currently addresses are stored in the person table along with personal stuff like date of birth, gender, ethnicity etc. the address part has six fields:
Oh by the way - this is for the UK so the address structure has to be a bit flexible to accommodate quite a few variations of how addresses can be written but a reasonable guide is:
Number (or house name) and street name
(often a second line for part one of address)
Village / urban area
Town
County
Postcode
Part one of my question is - is this the best way to store this information or should I just gather it like this on a form and then store it as concatenated text in a single field.
I have tried this on a small test database and it works OK and prints address labels etc. - - But is it better or not?
Part two is - should the addresses be stored in the person table at all or should it be in a separate table. This is the bit I cannot get my head round. If it is in a separate table then each record in the table needs to be unique but because of the nature of the client base (i.e. students) many students share accommodation - OK a 1 to many relationship - but what about students in halls of residence they will have an individual room but the remainder of the address is the same. So for say 1000 students in the same hall 95% of the address is repeated although each address is unique overall. And with 4 halls there are 4000 entries that could potentially be reduced to 4 plus a room number and hall name, but I am not at all sure how to achieve this. And then what about addresses for students not in halls but shared houses? I cannot get my head round this. I can see why it was set up the way it was but there must be a better way.
Do I need one table, two tables or six tables (one for each field)?
And how do I then enter data? Do I have to have combo boxes on each line to see if that value has been entered before?
The data gathered would always be entered via forms so I can get the fields together but I don't know how many tables I need nor how best to relate them.
Can anyone suggest how I might get round this problem?
Thanks... Sprocket
View 4 Replies
View Related
Sep 13, 2005
Hi,
I have a field in one of my tables that contains IP Addresses. These addresses can look something like 142.67.214.73/24 or 192.168.196.0. I would like create a calculated field so that ALL IP addresses just show the first 3 octet's. So the first one would just show 142.67.214 and the second one just 192.168.196
Any help would be great .......
Thanks !
View 2 Replies
View Related
Jun 12, 2006
Simple query from an amateur. I have a list of people in a table, each with thier email address. How can I convert this into a list of addresses to paste into a group email? (Ideally with ";" as a separator between addresses)
View 4 Replies
View Related
Feb 6, 2008
Hello all I am using MS access for a little personal project and I have house number and streets along with a day they are serviced.
example:
unit road type day
1 main st friday
2 main st friday
3 main st friday
4 main st friday
5 main st friday
6 main st friday
7 main st friday
13 turtle st monday
15 turtle st monday
16 turtle st monday
I want to make a report of this data to look like this
unit road type day
1-7 main st friday
13-16 tutle st monday
I figure I have to do some sort of query before I can make the report im jsut not sure how to seperate it or what symbols to use. I know this is faily simple I just can not get the computer to give me what I want....
ok I think i figured it out what I did was take unit and I put it in 2 times one fo min and one for max and then I grouped the road by ascending and it worked out
View 1 Replies
View Related
Sep 28, 2007
Hello everyone. I hope you are well. I am new to this forum and need some help with access.
I have a database which records an organisations addresses. There is the main address, where the activity takes place, and then there is the postal address, which is often different. What I want to be able to do is to select all the organisations in one town (e.g. Town1), but send information in the post to their postal address (Town2).
Is this something that can easily be done? I hope somebody can help me (especially with some user friendly terms).
Many thanks,
Chadder
View 10 Replies
View Related