Modules & VBA :: Google Maps (Calculate Shortest Route)
Nov 7, 2013
I'm trying to create an automated way of making a way to contact our personnel in case phones cannot be used. I have a list of all the address and currently separated by cities. I want to step it up a bit and with the use of google maps create a shortest route map. So one representative from one city will go to each house, another will go to the other cities to another rep, who then goes to each house in their city.
I would need a map for one person to each of the other reps.
And a map for the reps to drive the shortest route yet hitting all targets.
Is this within the scope of Access and Google Maps? I've looked at some of the database made by others on here but none of them show ability to find shortest route.
I am using Access 2003 and Google Chrome on my new(ish) laptop.
I have 2 forms - one collects postcodes from the user the other displays the results on google maps. This has worked ok on MS explorer but when I try to use this on my laptop i get "Script error on the Goolge map" I have attached a screen shot and the code.
Private Sub GoogleMaps_Click() DoCmd.Hourglass (True)
'I'm not allowed to post links so have added spaces in the next line...
MyGoogleMapURL = "http : / / maps . google . com / maps ? q = from : " MyGoogleMapURL = MyGoogleMapURL & Me.[ClientPickupList].Column(2, Goog1)
The table I created keeps track of several addresses and I use a report to print them into a booklet. I'd like to include a small map in the printed booklet for each group or one map showing all the addresses in the booklet but I am not sure if there is a simple way for Access and Google Maps to communicate. Anyone have experience in this area? Thanks in advance.
We have a form with the web browser control which links to Google maps and jumps to that location on the map by the lat and long and updates as you jump to each record. (The control is on a form and is only used there) The map itself works however i get a script error every time i jump to the next record....
When it loads google maps webpage it goes straight to a page that says the following.
"You seem to be using an unsupported browser. Old browsers can put your security at risk, are slow and don't work with newer Google Maps features. To access Google Maps, you'll need to update to a modern browser".
What would be the best table construction to allow for the inclusion of area information that varies depending on the selection of a certain route, to also include crossovers?
How best to allow users to see all of the areas that apply to each of the routings, but not to be presented with the same grouping twice if more than one routing is selected at the same time?
I should add that I am looking to have these selectable by a combo that is filtered according to the value(s) in other fields.
Hi, Im trying to make a google like search query on my database so a user can type in one word and then the database will search for all the records which contain this word and display them.
Any ideas?? I only want it to search through the one table,
Im no expert on VB so if someone could translate it into basic english that would be good.
Did you know that you can use Google to search the Access Forum and get a more refined result?
I find that the search facility provided is excellent at searching for single words. However it does not provide the sophistication of tools like Google for searching for exact phrases.
To get this sophistication do this:
Open Googles advanced page: (http://www.google.co.uk/advanced_search?hl=en)
The first section of this page is shaded blue, and contains the following items:
with all of the words with the exact phrase with at least one of the words without the words
You can add words to varying degrees of sophistication for your search.
This is the important bit! Just below this blue shaded area there is another section, go to the fifth item down in this section which is:"Domain" also make sure "Only" is selected. In the next text box (to the right of Only) place the domain you want to search in, this case you want to search the Access Forum so place in this box the following:
http://www.access-programmers.co.uk/forums
Now give it a try! Try searching for: "Date Selection" (without the Quotes)
If you search for this with the above Google method, you will get 90 results, If you search this result with the Forum search then you will get over 300 results.
Caveats: Your search will only return items within the access-programmers site, and only items that are allowed to be indexed by Google.
I want to access my database from different locations. More than 1 user may be using it at the same time.
Can I put the back-end of a split database in a Google Drive folder or a Dropbox folder and have multiple copies of the front-end for each user in their own location.
I know that Dropbox creates copies if two people update the backend at the same time. What about Google Drive? How does Google Drive handle it.
What are the potential problems of using these two services to share a database?
I have to make a form with multiple sections. Each section has n questions to which corresponds a numerical value from 1 to 4.
Example:
Question 1 value 2 Question 2 value 1 Question 3 value 3 Question 4 value 2 Question 5 value 4 Question 6 value 2
I have to choose the most recourrent number like the Excel MODA function then in this example is 2.But if there are more then one recurrence with the same times i must choose the highest one.
Question 1 value 2 Question 2 value 1 Question 3 value 3 Question 4 value 2 Question 5 value 4 Question 6 value 4
In the example above number 2 and 4 recur the same number of times and i must choose the number 4 because is the higher.
There is not a MODA function in Access, even if Excel, with the second example returns the most recurrent but the lower value 2.
i would want my form to calculate the age of a contact by using the inputted birthday, is this possible? and as long as the system clock is right, it should update too? or i'm wrong?
I am looking to calculate numbers in query like this if the field name in query is Unit and the second field name is amount and i want that the amount field to calculate the unit field on this criteria..Suppose if total unit is 393 so the calculation should be like this;
First hundred should be calculated with 100.00 X 5.79 = 579.00 Second 200.00 X 8.11 = 1622.00 Third 93.00 X 12.33 = 1146.69
Total should be displayed in the amount field = 3347.69
I have this code for calculating the age from birthdate but i want if there is years no months or days appear
Public Function CalcAge(Birthdate As Date) As String Dim intYears As Integer, intMonths As Integer, intDays As Integer intMonths = DateDiff("m", Birthdate, Date) intDays = DateDiff("d", DateAdd("m", intMonths, Birthdate), Date)
I am trying to get a module set-up that will add a number of workdays (no weekends, no holidays) to a date that is mentioned in a form and put the resulting deadline date in another field on the same form (date or remaining days to deadline would be even better).
Now it gets a little tricky, the module will need to select different amounts of workdays to be added to the date in the form depending on what status is selected (different statusses have different amounts of days).
I'll probably need: List of holidays List of days required per status Start date (to which the days can be added).
Example:
Status = "DQ" which has 2 days to work with. Start date in form = "21/03/2014". Result = 25/03/2014 or preferably "2 days remaining".
I want to select a date range from "Production" table where it agrees to the Dept_ID too. And then calculate the summation of the columns "hours", "produced" & "waste" of that particular range selection.
This is my code:
Code: Option Compare Database Private Sub cmdCal_Click() Dim sql As String Dim rs As Recordset Dim qdef As DAO.QueryDef Dim hours, waste, produced As Integer
[code]....
But it returns nothing, When i remove the errorHandler, it says that no records were found.
What I have is two fields, one is a simple date and the other is slightly more complex as it holds a date but in a different structure (a dated case number).
The case numbers are for example, 150211551223 the date being the first 6 numbers and equaling to 11/02/2015. so the code will need to grab this data, spin it around and convert it.
The formula will then be:
simpledate - convertedcasenumberdate = days between.
(simpledate will always be the latest date of the two).
At the moment I am working a little project at work and am stuck on how to calculate departments due date based on actual order due date.
example:
OrderID: xxxxxx-xx DueDate: 10/8/13
Now let say i have 5 different departments but I want/need to know what should be the due date for each of those departments based on the due date on top.
How to implement a functionality into my access database. The related tables required for this functionality can be found as an attachment.
When the information has been entered into the tables by the user, I would like to calculate the difference between the information for each part within the same table. The main columns for which the difference have to be calculated are: [RefObsInfo->RefSources] and [AltObsInfo->StatusAltSource] and [GenObsInfo->GenSources]. The values for these fields are restricted to 3 or 4 different ones. I also would like to show if the GenEstAvailable columns are changed, but that's for later.
In order to calculate this difference a query has to select for each Part the information related to the last date AND a date which has been specified by the user (with the previous date as max). For this the user is asked to give a from date, which she/he can select from a combobox. This combobox has a standard selected value which is the MaxDate-1, i.e. the previous date. The difference should be calculated from the previous date to the last date. I would prefer to give each (predefined) difference a specific action to show the user the difference in a matter of seconds.
I have two numbers, i need to calculate how much percentage of one is the other. E.g
num_1 = 100 num_2 = 10 percent = 10%
Users enter a dollar amount (retainer) and my code should calculate the percent of the total proposal amount.
Actual Code
Private Sub cmdSubmit_Click() Dim intProposalTotal As Double 'if i use interger i get "overflow" error intProposalTotal = Nz(DLookup("ProposalTotal", "qryPropsalTotalForRetainer", "proposal_id=" & Me.proposal_id), 0)
[Code] .....
billing_retainer_percent is formatted to Percent with 0 decimals. In the actual table Type - Number, Format - Percent, Field Size - Single. What i get is 100% instead of 10%.
I have a form that have textbox that calculate total and then i want to convert numbers to words. Iv got the code with function currencytotext but when i set the code source of another textbox to:
=currencytotext([inv_total])
I have an error. I saw this on internet but i think bcz I am using access 2013 may be the syntax is different a bit.