none
If A checkBox on Another form is checked and check If a value is below VB

    Question

  • Hi Good People

    I have 2 Forms and on Form1 I have a ComboBox Called AccountName, And If I select an Account from this AccountNameComboBox on Form1. I want to Check If  "AccountActiveNoCheckBox Is Checked", and Check if the CreditLimitTextBox value is below Say $/£100 from form2

    would the code be something like

     Private Sub AccountNameComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles AccountNameComboBox.SelectedIndexChanged
            Dim CreditLimitTextBox As Decimal = Val(CustomerForm2.CreditLimitTextBox)
            If AccountNameComboBox.SelectedText = CustomerForm2.AccountNameTextBox.Text And _
                CustomerForm2.AccountActiveNoCheckBox.Checked _
                And CustomerForm2.CreditLimitTextBox.Text > 100 = True Then
                MsgBox("Account is Inactive" & vbCrLf & "Please Contact your Manager for Instructions")
            Else
            End If
        End Sub

    Kind Regards

    Gary


    Gary Simpson


    • Edited by Gary Simpson Tuesday, December 11, 2012 4:35 PM edit
    Tuesday, December 11, 2012 4:34 PM

Answers

  • Not sure everything you're doing here, so I hope you find this helpful:

    I'm mainly trying to show how you should turn your account information into an account object, and the pass that to a new instance of an account form, when the form is shown, that way you don't have to weave back and forth between forms, plus this way will allow you to open more than one account window simultaneously.

    Option Strict On
    Public Class Form1
        Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
            Dim Account As New AccountObject(1234567, "Paul Ishak", True)
            Dim Form2 As New AccountForm With {.Visible = True, .Text = "Account - " & Account.Number, .Name = Account.Owner}
            Form2.Show(Account)
        End Sub
    End Class
    Public Class AccountObject
        Public Property Number As Integer = -1
        Public Property Owner As String = "None"
        Public Property Active As Boolean = False
        Sub New(AccountNumber As Integer, Owner As String, AccountActive As Boolean)
            Me.Number = AccountNumber
            Me.Owner = Owner
            Me.Active = AccountActive
        End Sub
        Sub New()
    
        End Sub
    End Class
    Public Class AccountForm
        Inherits Form
        Public Account As AccountObject
        Friend WithEvents button1 As New Button With {.Parent = Me, .Text = "owner name", .Width = Me.ClientRectangle.Width}
        Public Overloads Sub Show(Account As AccountObject)
            Me.Account = Account
        End Sub
        Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
            MsgBox(Me.Account.Owner)
        End Sub
    End Class



    If you want something you've never had, you need to do something you've never done.

    Everyone should take the time to mark helpful posts and propose answers!

    Answer an interesting question?
    Create a wiki article about it!

    My Technet Wiki Articles


    Tuesday, December 11, 2012 5:29 PM
    Moderator
  • Gary,

    A form is no DataItem. 

    So if you set something with a checkbox, store it somewhere, that can be just in memory for instance in a module (not the best but a first step), in the registry, in the settings or in any other data item.

    But not in a form.


    Success
    Cor

    Tuesday, December 11, 2012 4:51 PM
  • Gary,

    Start by putting the following at the top of your forms (all of them):

    Option Strict On

    Now look through your code and fix the errors that you'll see. Also though, reconsider how you're naming things. You have a variable called a textbox? Rename those things so they make more sense.

    Let's get that far and see how you make out please?


    Please call me Frank :)

    • Marked as answer by Gary Simpson Monday, December 24, 2012 1:23 AM
    Tuesday, December 11, 2012 8:10 PM
  • Gary,

    I’m only seeing little bits and pieces here and there and having to guess at where it all fits (or for that matter, which form it’s on). Moreover I don’t yet really understand what your program is doing so I’ll just talk some about “general” things looking at the topic as a guide and what I’ve seen of your code so far.

    Based on this:

    If A checkBox on Another form is checked and check If a value is below VB

    The first thing would be a question of how you’re displaying the other form and how you’re “getting” the information back. Assuming you show it modally (.ShowDialog) and that you instantiate it in code, then you need to return the value of it before it’s disposed and then store that value somewhere that you can use after it's disposed.

    For example you might have something like this in a method of Form1 that calls that other form. The following is a very simplistic example that might be on your Form1:

    Private Sub ShowMySecondForm()

           Dim okToProceed As Boolean

           Using f2 As New Form2

               f2.ShowDialog()

               ' At this point, the user has closed the second form

               ' and in the closing event of that form, the public

               ' variable on Form2 called "userCheck" has the value

               ' of the checkbox's check (which is a boolean).

               okToProceed = f2.userCheck

           End Using

           ' Now Form2 has been closed and disposed; it doesn't

           ' exist now - but note the scope of the variable

           ' in this method called "okToProceed". This now

           ' has that same boolean value - ergo, whether the

           ' checkbox was checked or not when the user closed

           ' Form2 so we can now use that as the first part

           ' of your needed logic.

       End Sub

    The code on Form2 (again, very simplistic) might look something like this:

    Option Strict On

    Option Explicit On

    Public Class Form2

       Public userCheck As Boolean

       Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) _

           Handles Me.FormClosing

           userCheck = CheckBox1.Checked

       End Sub

    End Class

    You can see that it’s quite simplistic! ;-)

    But that gets us to the first part; getting the Boolean variable indicating whether the user has checked (or unchecked) the checkbox on the second form.

    Now let’s move on to other parts and issues that I see with what you’ve posted.

    You have a TextBox that apparently is where the user types in a value (a decimal). First, I would encourage you to never use Val – it’s an old leftover and frankly should be done away with. It won’t always do what you think it will do.

    But before I proceed, think about this: What if the user typed in text rather than a number? What if they typed in a number – but it’s invalid for business rules (for instance, maybe the number has to be at least ten dollars or … whatever else you come up with)?

    Before you allow them to calculate (or whatever this thing does), you need to validate that the information they’ve entered is in fact valid.

    I’ll be happy to show you a better way but obviously I’m suggesting changing your whole program so before continuing, let me know your thoughts on this so far.


    Please call me Frank :)

    • Marked as answer by Gary Simpson Monday, December 24, 2012 1:23 AM
    Tuesday, December 11, 2012 11:07 PM

All replies

  • Gary,

    A form is no DataItem. 

    So if you set something with a checkbox, store it somewhere, that can be just in memory for instance in a module (not the best but a first step), in the registry, in the settings or in any other data item.

    But not in a form.


    Success
    Cor

    Tuesday, December 11, 2012 4:51 PM
  • Not sure everything you're doing here, so I hope you find this helpful:

    I'm mainly trying to show how you should turn your account information into an account object, and the pass that to a new instance of an account form, when the form is shown, that way you don't have to weave back and forth between forms, plus this way will allow you to open more than one account window simultaneously.

    Option Strict On
    Public Class Form1
        Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
            Dim Account As New AccountObject(1234567, "Paul Ishak", True)
            Dim Form2 As New AccountForm With {.Visible = True, .Text = "Account - " & Account.Number, .Name = Account.Owner}
            Form2.Show(Account)
        End Sub
    End Class
    Public Class AccountObject
        Public Property Number As Integer = -1
        Public Property Owner As String = "None"
        Public Property Active As Boolean = False
        Sub New(AccountNumber As Integer, Owner As String, AccountActive As Boolean)
            Me.Number = AccountNumber
            Me.Owner = Owner
            Me.Active = AccountActive
        End Sub
        Sub New()
    
        End Sub
    End Class
    Public Class AccountForm
        Inherits Form
        Public Account As AccountObject
        Friend WithEvents button1 As New Button With {.Parent = Me, .Text = "owner name", .Width = Me.ClientRectangle.Width}
        Public Overloads Sub Show(Account As AccountObject)
            Me.Account = Account
        End Sub
        Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
            MsgBox(Me.Account.Owner)
        End Sub
    End Class



    If you want something you've never had, you need to do something you've never done.

    Everyone should take the time to mark helpful posts and propose answers!

    Answer an interesting question?
    Create a wiki article about it!

    My Technet Wiki Articles


    Tuesday, December 11, 2012 5:29 PM
    Moderator
  • Hi again Frank

    is this the way to go

    Private Sub AccountNameComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles AccountNameComboBox.SelectedIndexChanged
            'Here It checks if customer AccountcheckBoxNO is checked
            If AccountNameComboBox.SelectedText = My.Settings.CustomerCheckBoxNo = True Then
                'If AccountcheckBoxNO is checked then this msgbox is shown
                MsgBox("Account is Inactive" & vbCrLf & "Please Contact your Manager for Instructions")
            Else
            End If
            ' here checks if customer credit has not gone over the limit set
            If AccountNameComboBox.SelectedText = My.Settings.CreditLimitTextBox.ToString Then
                MsgBox("Account is Inactive" & vbCrLf & "Please Contact your Manager for Instructions")
            Else
            End If
           
        End Sub


    Gary Simpson

    Tuesday, December 11, 2012 5:59 PM
  • Gary,

    Start by putting the following at the top of your forms (all of them):

    Option Strict On

    Now look through your code and fix the errors that you'll see. Also though, reconsider how you're naming things. You have a variable called a textbox? Rename those things so they make more sense.

    Let's get that far and see how you make out please?


    Please call me Frank :)

    • Marked as answer by Gary Simpson Monday, December 24, 2012 1:23 AM
    Tuesday, December 11, 2012 8:10 PM
  • Hi Frank I got this far with my code:

    Private Sub AccountNameComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles AccountNameComboBox.SelectedIndexChanged
            'Here It checks if customer AccountcheckBoxNO is checked
            If CBool(AccountNameComboBox.SelectedText) = My.Settings.CustomerCheckBoxNo = True Then
                'If AccountcheckBoxNO is checked then this msgbox is shown
                MsgBox("Account is Inactive" & vbCrLf & "Please Contact your Manager for Instructions")
            Else
            End If
            ' here checks if customer credit has not gone over the limit set
            If CBool(CLng(AccountNameComboBox.SelectedText.ToString = CustomerForm2.AccountNameTextBox.Text = True) And _
                CLng(Val(CustomerForm2.CreditLimitTextBox)) And CLng(Val(CDbl(My.Settings.CreditLimit > 100 = True)))) Then
                MsgBox("Account is Inactive" & vbCrLf & "Please Contact your Manager for Instructions")
            Else
            End If
        End Sub


    Gary Simpson


    • Edited by Gary Simpson Tuesday, December 11, 2012 10:18 PM
    Tuesday, December 11, 2012 10:17 PM
  • Gary,

    I’m only seeing little bits and pieces here and there and having to guess at where it all fits (or for that matter, which form it’s on). Moreover I don’t yet really understand what your program is doing so I’ll just talk some about “general” things looking at the topic as a guide and what I’ve seen of your code so far.

    Based on this:

    If A checkBox on Another form is checked and check If a value is below VB

    The first thing would be a question of how you’re displaying the other form and how you’re “getting” the information back. Assuming you show it modally (.ShowDialog) and that you instantiate it in code, then you need to return the value of it before it’s disposed and then store that value somewhere that you can use after it's disposed.

    For example you might have something like this in a method of Form1 that calls that other form. The following is a very simplistic example that might be on your Form1:

    Private Sub ShowMySecondForm()

           Dim okToProceed As Boolean

           Using f2 As New Form2

               f2.ShowDialog()

               ' At this point, the user has closed the second form

               ' and in the closing event of that form, the public

               ' variable on Form2 called "userCheck" has the value

               ' of the checkbox's check (which is a boolean).

               okToProceed = f2.userCheck

           End Using

           ' Now Form2 has been closed and disposed; it doesn't

           ' exist now - but note the scope of the variable

           ' in this method called "okToProceed". This now

           ' has that same boolean value - ergo, whether the

           ' checkbox was checked or not when the user closed

           ' Form2 so we can now use that as the first part

           ' of your needed logic.

       End Sub

    The code on Form2 (again, very simplistic) might look something like this:

    Option Strict On

    Option Explicit On

    Public Class Form2

       Public userCheck As Boolean

       Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) _

           Handles Me.FormClosing

           userCheck = CheckBox1.Checked

       End Sub

    End Class

    You can see that it’s quite simplistic! ;-)

    But that gets us to the first part; getting the Boolean variable indicating whether the user has checked (or unchecked) the checkbox on the second form.

    Now let’s move on to other parts and issues that I see with what you’ve posted.

    You have a TextBox that apparently is where the user types in a value (a decimal). First, I would encourage you to never use Val – it’s an old leftover and frankly should be done away with. It won’t always do what you think it will do.

    But before I proceed, think about this: What if the user typed in text rather than a number? What if they typed in a number – but it’s invalid for business rules (for instance, maybe the number has to be at least ten dollars or … whatever else you come up with)?

    Before you allow them to calculate (or whatever this thing does), you need to validate that the information they’ve entered is in fact valid.

    I’ll be happy to show you a better way but obviously I’m suggesting changing your whole program so before continuing, let me know your thoughts on this so far.


    Please call me Frank :)

    • Marked as answer by Gary Simpson Monday, December 24, 2012 1:23 AM
    Tuesday, December 11, 2012 11:07 PM
  • Hi Frank
    Thank you for replying to my Question
    A couple of years or more ago I use to work as a taxi Driver and I had a stroke so I couldn't drive anymore. And my Friend Started his own small Taxi Firm. I was in the office for a bit of time before I had another stroke. and my left side got paralized but some feeling is coming back. but my friend has given me a task. "To Write A Programe for him.
    which I am trying to do with everyone's help. "Thank you everyone"
    I have 10 forms

    Form1 = Booking Form
    Form2 = Customer Form
    Form3 = Driver Form
    Form4 = Fares Form
    Form5 = Office Staff Form
    Form6 = Vehicle Form
    Form7 = Staff Login Form
    Form8 = Management login Form
    Form9 = Menu Form
    Form10 = Daily Jobs Form (DataGridView)

    Staff should have Access to the Booking Form and daily jobs form and the staff Login form on the menu form. Management all forms should include
    this is why I haven't chosen tab pages

    when office staff login correctly then they should see the daily jobs form
    and or the booking form, this is why i created a menu form with 10 buttons all Buttons should be Enabled/Disabled according to staff rights on who can view what form.
    on the booking form I have dragged n dropped from the Fares Form DestinationFrom TextBox , DestinationTo TextBox , FareTextBox on to the booking form. I have Dragged n Dropped AccountNameTextBox from the Customer Form. I have Dragged n Dropped DriverNameTextBox from the Driver Form and I have Dragged n Dropped VehicleRequiredCheckBox from the Vehicle form all onto the Booking Form.
    I hope you get all this as I am not as bright as I was.
    If you require more information Please let me know

    Best Regards
    Gary


    Gary Simpson

    Wednesday, December 12, 2012 1:26 AM
  • Gary,

    I’m very saddened to learn of your plight. I’m proud that you’ve chosen to push on though – that’s a great outlook and I’m more than happy to do my best to help you accomplish your goal on this project (at least to the best of my own ability of course).

    You said:

    Staff should have Access to the Booking Form and daily jobs form and the staff Login form on the menu form. Management all forms should include
    this is why I haven't chosen tab pages.

    Even though this is off-topic for what you asked, let’s not give up on the idea of utilizing a TabControl. There are advantages (for instance you’re virtually unlimited on how many pages it can hold. I’m sure there’s a maximum but whatever that amount is, I feel sure you’ll never need to top it). Another advantage is that everything is on a single form – no passing of data back and forth between forms, no worrying about closing/disposing of them, and so on.

    Have a look at something that I created in order to exemplify my point here. I have form which has as the very first component, a SplitContainer. I have it set so that it’s locked in place (i.e., the user can’t move the distance) and I have some buttons in the left pane and a TabControl in the right pane, docked to fill:

    When I first turn the program on, all TabPages are removed by default:

    But as I click the buttons (in any order and it can be repeated), the program will display the TabPages that I’ve instructed it to do:

    I’ll post the code in a follow-up message but it’s quite simple; only a few lines of code to do this. My point here is that I’d like your thoughts on modifying how you’re doing this – maybe start all over again, but lay it out based on the use of TabPages in a TabControl and only use a dialog where necessary for very specific things (like logging in for instance).

    Give it some thought. :)


    Please call me Frank :)

    Wednesday, December 12, 2012 3:39 PM
  • Option Strict On Option Explicit On

    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles MyBase.Load

    RemoveAllTabPages()

    End Sub

     

    Private Sub RemoveAllTabPages() For Each tp As TabPage In TabControl1.TabPages TabControl1.TabPages.Remove(tp) Next End Sub

    Private Sub AddTabPage(ByVal tp As TabPage) TabControl1.TabPages.Add(tp) End Sub

    Private Sub btn_Show1And2_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btn_Show1And2.Click RemoveAllTabPages() AddTabPage(TabPage1) AddTabPage(TabPage2) End Sub

    Private Sub btn_Show3And4_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btn_Show3And4.Click RemoveAllTabPages() AddTabPage(TabPage3) AddTabPage(TabPage4) End Sub

    Private Sub btn_ShowAll_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btn_ShowAll.Click RemoveAllTabPages() AddTabPage(TabPage1) AddTabPage(TabPage2) AddTabPage(TabPage3) AddTabPage(TabPage4) End Sub End Class



    Please call me Frank :)

    Wednesday, December 12, 2012 3:40 PM
  • Hi Frank

    Once Again your are prepared to show me how to do this programe another way. I really can't thank you enough. But can a datagridView be put on a tab Page.

    And Will I have to write a new Data Source if I start over (From Scratch)

    I dont Mind doing that But will take me A little time as I can only use one hand for typing

    you have very kindley shown me another way, who am I to refuse help from an expert like you and yes can we give it a try please

    Kind Regards

    Gary


    Gary Simpson

    Wednesday, December 12, 2012 6:00 PM
  • can a datagridView be put on a tab Page.

    Be adventurous, try and see what happens.

    If you want something you've never had, you need to do something you've never done.

    Everyone should take the time to mark helpful posts and propose answers!

    Answer an interesting question?
    Create a wiki article about it!

    My Technet Wiki Articles

    Wednesday, December 12, 2012 6:03 PM
    Moderator
  • Hi Frank

    Once Again your are prepared to show me how to do this programe another way. I really can't thank you enough. But can a datagridView be put on a tab Page.

    And Will I have to write a new Data Source if I start over (From Scratch)

    I dont Mind doing that But will take me A little time as I can only use one hand for typing

    you have very kindley shown me another way, who am I to refuse help from an expert like you and yes can we give it a try please

    Kind Regards

    Gary


    Gary Simpson

    Ha! I'm no expert!!

    You can put anything on a TabPage that you would put directly on your form.

    I don't know how you've set up your data (that's not come up yet), so I don't know how to answer the question about the datasource.

    If your code is working now, you might want to do this: Open Visual Studio up. Now minimize that and open another instance of it up. In one you can copy, in the other you can paste. I've done that many times! Of course any references in one has to be in the other - for obvious reasons.


    Please call me Frank :)

    Wednesday, December 12, 2012 6:37 PM
  • Frank

    Or I can Just connect to the server,  Data source I have created


    Gary Simpson


    • Edited by Gary Simpson Wednesday, December 12, 2012 7:55 PM edit
    Wednesday, December 12, 2012 7:54 PM
  • Gary,

    I wanted to proceed about something that I started to explain yesterday but didn’t complete and that’s how (or I should say ‘a better way’ because there’s rarely ever just one way to go about doing anything in VB) to validate your data when you use a TextBox for your users to enter numerical data.

    I’ve created a sample project to demonstrate this. By the way, this and the other one I did this morning are both saved to my “Gary” folder – if you want I’ll be happy to zip that up and upload for you to experiment with.

    Onto this one though, the form is laid out with one TextBox, one CheckBox, and a button. Unseen though is also an ErrorProvider (it’s in your toolbox, just add one and you’ll see it shown I the component tray at the bottom of VS).

    The purpose of the ErrorProvider is to allow us to show the user the error graphically as I’ll demonstrate shortly.

    The validation is done by way of the TextBox’s .Validating event. The validating event is called whenever the control (a TextBox in this case) has focus and then loses it; in that way it works like the .Leaving event but that’s all the two have in common. Using the .Validating event also gives us the ability to ‘lock the user in’ and not allow them to move to another control until they’ve cleared the error (in this case, either by providing a valid answer or by clearing the text all together).

    I have a CheckBox that will be used for your testing; so you can either turn on or off specific validation and by that I mean that I’ve created a “rule” that says that the user has to enter an amount that’s at least ten dollars. When you uncheck it, it doesn’t perform that test.

    Here’s how it looks when run:

    First let’s see what happens when I enter text into the TextBox:

    They’re also ‘locked’ into that TextBox until they make corrections. Now I’ll enter valid data:

    Finally now, let’s perform the second test where it makes a specific test for the numeric value entered:

    I have the code shown on a page of my website here, not because it’s so much code, but I just really do hate how they have this forum now and the code block tool is probably the worst part of it.

    Let me know if you want me to zip the project(s) up and I’ll be happy to. Give this some thought as it’ll no doubt come into play in your program. :)


    Please call me Frank :)

    Wednesday, December 12, 2012 8:17 PM
  • Frank

    when A user fills out a booking form/Tab and when destinationFromTextBox is being typed into, I want to suggest as typing is occuring and if that road/street is not found in the DataBase then suggest it to be put into the database, so the database builds as time goes on.

    Second I want the same as above for DestinationToTextBox and then get the fare/Price put into fareTextBox Automatically. so a user only has to fill the extraFareTextBox if there is any extra Price.

    Can you understand that

    Gary


    Gary Simpson

    Wednesday, December 12, 2012 8:47 PM
  • Frank

    Somehow I managed To get my tables into the DataSource


    Gary Simpson

    Wednesday, December 12, 2012 8:50 PM
  • Ah, I'm glad you got that working then.

    Let me preface this by saying that I'm a "database lightweight" and I do things in a whole different way than anyone else here (or at least as far as I can tell that's true). I've only ever set up and used local databases; if this is server-based then I'm out of my element totally. Even with local databases, I rely on the wizard to set up the DataSet, the BindingSource, and the TableAdapter. I also make a lot of use of LINQ-To-SQL to do some things with.

    With that out of the way (my point is, it might be best to start a question on this topic alone and get others to help out), what you asked before about showing suggestions as they type is AutoComplete. You might consider using a ComboBox rather than a TextBox although they both support AutoComplete.

    AutoCompleteMode

    AutoCompleteSource

    The idea of building as you go is a good one but I can see some things that you might want to think about. What if they mistype something? Now your database would have two entries (one for the typo even though it was in there all along, spelled correctly). Would they have the other information needed for a given location? I don't know how you're calculating fares - so this may or may not be applicable but something to consider.

    Have you considered using Bing Maps for part of this? It's pretty good with figuring out "this is what they meant" even from typos and will return a map, the driving distance, and even the amount of time based on some stated condition.


    Please call me Frank :)

    Wednesday, December 12, 2012 9:10 PM
  • Frank

    Calculating fares. these are pre-fixed fares like destinationFrom 7th Avenue  to DestinationTo 6th Avenue. or from a town to an airport will All be fixed Prices, The prices are fixed by managment they wil have to enter Manually there own Destinations and price's.

    The other Question Is what type of vehicle is requested and what time of day it is and what day it is because a sunday a £/$ 0.50 is added to the fare.

    well you guy's have helped me out on this with the code. But how it will work. doing this with Tabs I don't know. I can post all code I have on the faresForm. or i could make a fares form and send it to your site lik last time

    Kind Regards

    Gary


    Gary Simpson


    • Edited by Gary Simpson Thursday, December 13, 2012 12:02 AM Added text
    Wednesday, December 12, 2012 11:58 PM
  • ...these are pre-fixed fares like destinationFrom 7th Avenue  to DestinationTo 6th Avenue. or from a town to an airport will All be fixed Prices, The prices are fixed by managment they wil have to enter Manually there own Destinations and price's.

    If that's the case then would it make sense to ask them to add a new one? Would it only be management doing this so that they'd be in the position to then assign the price along with it?

    I still think a combo with AutoComplete would be a way to go but if they actually misspell a word, it won't be found in the database. Bing might be a way to prove that it's valid or not - just a thought of course.


    Please call me Frank :)

    Thursday, December 13, 2012 12:05 AM
  • can we do it your way then please Frank

    you know best


    Gary Simpson

    Thursday, December 13, 2012 12:43 AM
  • Hi Frank

    The Code I have For the Fares Form:

    Public Class FaresForm
        Private Sub FaresTableBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs)
            Me.Validate()
            Me.FaresTableBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.GarysTaxiDataBaseDataSet1)
        End Sub
        Private Sub FaresTableBindingNavigatorSaveItem_Click_1(sender As System.Object, e As System.EventArgs) Handles FaresTableBindingNavigatorSaveItem.Click
            Me.Validate()
            Me.FaresTableBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.GarysTaxiDataBaseDataSet1)
        End Sub
        Private Sub FaresForm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the 'GarysTaxiDataBaseDataSet1.FaresTable' table. You can move, or remove it, as needed.
            Me.FaresTableTableAdapter.Fill(Me.GarysTaxiDataBaseDataSet1.FaresTable)
        End Sub
        Function RoundUp(ByVal Input As Decimal, ByVal Mult As Decimal) As Decimal
            Return CDec(Int(((Input * Mult) + 0.05) * 10) / 10)
            'This is a Roundup of a sum used when you Insert a amount Into Insert FareTextBox
            ' And if the sum in Time_Half TextBox Ends with a 0.05 The This Round up sum will
            'Round 0.05 to 0.10....'
            'So please REMEMBER when Inserting a Amount into the InsertFareTextbox.
            'Only Insert Values that end with a Zero, 0, Example(1.00, 1.10, 1.50 ...ect) 
            'AND NOT Values that end with a 5 (1.05, 1.15, 1.55...ect)
        End Function
        
        Private Sub InsertFareTextBoxTextBox_TextChanged(sender As System.Object, e As System.EventArgs) Handles InsertFareTextBoxTextBox.TextChanged
            Dim InsertFare As Decimal
            If Decimal.TryParse(InsertFareTextBoxTextBox.Text, InsertFare) Then
                'This InsertFareTextBox is where I insert the Fare amount of that it costs from detination
                'To Destination I require and starts the process below.
                NormalFare4TextBox.Text = FormatCurrency(InsertFare)
                'This NormalFareTextBox = the ammount put into InsertFareTextBox
                TimeHalfFare4TextBox.Text = FormatCurrency(InsertFare * 1.5)
                'This TimeHalfFareTextBox = NormalFareTextBox and then Times by 1.5 
                TimeHalfFare4TextBox.Text = FormatCurrency(RoundUp(InsertFare, CDec(1.5)))
                'And the round function rounds the last digit to 0.10 ect But only if the sum is 0.05 ect
                DoubleFare4TextBox.Text = FormatCurrency(InsertFare * 2)
                'This DoubleFareTextBox = NormalFareTextBox and then Times by 2
                NormalFare6TextBox.Text = FormatCurrency(InsertFare * 1.5)
                'This Normal6_FareTextBox.Text = the amount of InsertFareTextBox and then times by 1.5
                NormalFare6TextBox.Text = FormatCurrency(RoundUp(InsertFare, CDec(1.5)))
                'And the round function rounds the last digit to 0.10 ect But only if the sum is 0.05 ect
                TimeHalfFare6TextBox.Text = FormatCurrency(CDbl(NormalFare6TextBox.Text) * 1.5)
                'this Time_Half6_FareTextBox = Normal6_FareTextBox and then times by 1.5
                TimeHalfFare6TextBox.Text = FormatCurrency(RoundUp(CDec(NormalFare6TextBox .Text), CDec(CDbl(1.5))))
                DoubleFare6TextBox.Text = FormatCurrency(CDbl(NormalFare6TextBox.Text) * 2)
                'This Time_Half6_FareTextBox = Normal6_FareTextBox and then times by 2
                NormalFare8TextBox.Text = FormatCurrency(InsertFare * 3)
                'This Normal8_TextBox = NormalFareTextBox and then times by 3
                TimeHalfFare8TextBox.Text = FormatCurrency(CDbl(NormalFare8TextBox.Text) * 1.5)
                'This Time_Half8_FareTextBox = Normal8_TextBox and then times by 1.5
                TimeHalfFare8TextBox.Text = FormatCurrency(RoundUp(CDec(CDbl(NormalFare8TextBox.Text)), CDec(CDbl(1.5))))
                'This Time_Half8_FareTextBox = Time_Half8_FareTextBox and then times by 1.5
                'And the round function rounds the last digit to 0.10 ect But only if the sum is 0.05 ect
                DoubleFare8TextBox.Text = FormatCurrency(CDbl(NormalFare8TextBox.Text) * 2)
                'This Double8_FareTextBox = Normal8_TextBox.Text and then times by 2
            Else
                MessageBox.Show("Enter a valid fare amount", "Numeric Only", MessageBoxButtons.RetryCancel, MessageBoxIcon.Exclamation)
                'This is a message that will be shown if an invalid key is pressed
            End If
        End Sub
        Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
            'This Timer1 Supplies Label1 with the day, Date, Time
            Select Case Weekday(Now)
                Case Is = vbSaturday
                    Label1.Text = "Today is Saturday     " + Today + "    " + TimeOfDay
                Case Is = vbSunday
                    Label1.Text = "Today is Sunday     " + Today + "    " + TimeOfDay
                Case Is = vbMonday
                    Label1.Text = "Today is Monday     " + Today + "    " + TimeOfDay
                Case Is = vbTuesday
                    Label1.Text = "Today is Tuesday     " + Today + "    " + TimeOfDay
                Case Is = vbWednesday
                    Label1.Text = "Today is Wednesday     " + Today + "    " + TimeOfDay
                Case Is = vbThursday
                    Label1.Text = "Today is Thursday     " + Today + "    " + TimeOfDay
                Case Is = vbFriday
                    Label1.Text = "Today is Friday     " + Today + "    " + TimeOfDay
            End Select
        End Sub
        
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
            'Open'Customer Account Form
            CustomerAccountForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
            'Open's Vehicle Form
            VehicleForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
            'Open's Fares Form
        End Sub
        Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
            'Open's Staff Form
            StaffForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
            'Open's Drivers Form
            DriverForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
            'Open's Booking Form
            BookingForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click
            'Open's Login Form
        End Sub
        Private Sub Button8_Click(sender As System.Object, e As System.EventArgs) Handles Button8.Click
            'Open's Menu Form
            MenuForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button9_Click(sender As System.Object, e As System.EventArgs) Handles Button9.Click
            'Adds New Booking
        End Sub
        Private Sub Button10_Click(sender As System.Object, e As System.EventArgs) Handles Button10.Click
            'Save New Booking
            FaresTableBindingNavigatorSaveItem.PerformClick()
        End Sub
        Private Sub Button11_Click(sender As System.Object, e As System.EventArgs) Handles Button11.Click
            'Delete's Booking
        End Sub
        Private Sub Button12_Click(sender As System.Object, e As System.EventArgs) Handles Button12.Click
            'Exit's the programe
            MsgBox("Gary's Programe Is Now Closing")
            Application.Exit()
        End Sub
        Private Sub BackColourToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackColourToolStripMenuItem.Click
            ' You can choose the Back Color of the form
            ColorDialog1.ShowDialog()
            Me.BackColor = ColorDialog1.Color
            My.Settings.BackColor = ColorDialog1.Color
        End Sub
        Private Sub FontColourToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles FontColourToolStripMenuItem.Click
            ColorDialog1.ShowDialog()
            Me.ForeColor = ColorDialog1.Color
            My.Settings.ForeColor = ColorDialog1.Color
        End Sub
        Private Sub ExitToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ExitToolStripMenuItem.Click
            ' Exit the Programe
            Application.Exit()
        End Sub
        Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click
        End Sub
    End Class

    And A Picture Of the fare's Form


    Gary Simpson

    Thursday, December 13, 2012 12:07 PM
  • Hi Paul Ishak

    Thank you for your imput.

    And Frank Has asked me to start Afresh Using Tab Pages So I am Waiting For Frank To Show me How to start A new way that I have Not done Before Using Tabs.

    But Please do help If you Feel you have any imput.

    Kind Regards

    Gary


    Gary Simpson

    Thursday, December 13, 2012 12:34 PM
  • Hi Paul Ishak

    Thank you for your imput.

    And Frank Has asked me to start Afresh Using Tab Pages So I am Waiting For Frank To Show me How to start A new way that I have Not done Before Using Tabs.

    But Please do help If you Feel you have any imput.

    Kind Regards

    Gary


    Gary Simpson

    I have already provided my input. Did you understand what I provided, and its meaning?

    If you want something you've never had, you need to do something you've never done.

    Everyone should take the time to mark helpful posts and propose answers!

    Answer an interesting question?
    Create a wiki article about it!

    My Technet Wiki Articles

    Thursday, December 13, 2012 12:45 PM
    Moderator
  • Gary,

    So what I'm seeing there is where the management would enter the information for some particular to/from, correct? That information will later be used in another form (I guess?).

    I'm trying to grasp the concept here. Could I get you to type in some typical information and take another screenshot please?

    What sort of database are you using and what column is the primary key?


    Please call me Frank :)

    Thursday, December 13, 2012 1:47 PM
  • Hi Frank

    As you know I managed to get my old Datasource into this new Project, I have put a split container onto form1 and from the datasource I have Dragged n Dropped onto Panel2 from My Datasource as follows: I dont know if this is right or not

    From Datasource / Booking 

    (1 TheDatetextBox as DateTimePicker), (2TheTimeTextBox as a TheTimeMaskedTextBox),

    (3 FareTextBox as FareTextBox), (4 ExtraFareTextBox as ExtraFareTextBox), (5 TotalFareTextBox as TotalFareTextBox)..... And

    ......................................................................................................

    From Datasource / Customer

    (1 AccountNameTextBox as AccountNameComboBox)...... and

    ......................................................................................................

    From Datasource / Driver

    (1 DriverCallsignTextBox as DriverCallsignComboBox)...... And

    ......................................................................................................

    From Datasource / Fares

    (1 NameNumberTextBox as NameNumberTextBox), (2 DestinationFromTextBox as DestinationFromComboBox), (3 DestinationToTextBox as DestinationToComboBox).

    Pictures Below:


    Gary Simpson

    Thursday, December 13, 2012 5:40 PM
  • Gary,

    You're way ahead of me - I don't know how to suggest anything until I understand more about where it's going (although I do wonder what happened to the TabControl?).

    Would you please answer the questions that I asked before you posted that post please? Also, can you textually sort of give me an overview of all that the program does?


    Please call me Frank :)

    Thursday, December 13, 2012 7:32 PM
  • Frank

    On Programe start-up there should be a login screen one for Management and or one for staff

    All User Should be able to access the Booking Screen(TabPage) and The Daily jobs screen(TabPage) The daily Jobs Screen(TabPage) should show all the day's jobs in order of Date Then time . So if a customer calls in for a booking Via Telephone or in person

    So the user can see at a glace at the Daily jobs screen and tell the customer what times are availible or how long the customer has to wait for a taxi to become clear from the job they are doing. or a taxi might be free to do the job right away.

    now as for the booking form (TabPage) the user needs to select a date from the datetimepicker if it is a different day from the date showing in the Datetimepicker, now they type in an availible time for the pick-up.

    next the user has a choice of three CheckBoxes, (4seat, or 6Seat, or 8Seat) vehicle

    Next NameNumber textBox should have a number or name of the building or the name of the customer being picked -up user types this in.

    Next DestinationFrom ComboBox the user types in a Street/Road/Avenue..ect and this DestinationFromComboBox should read off the binding source on the (faresForm, DestinationFromTextBox). also on the booking Form(Tabpage) is DestinationToComboBox this should also read of the (faresform, DestinationTo) and suggest what the user is typing in.

    Next on the booking Form are FareTextBox, ExtraFareTextBox, TotalFareTextBox, the FareTextBox is a read only so is the TotalFareTextBox. The FareTextBox should read from the Choice of Vehicle ect 4seat, 6 seat, 8seat checkBoxes then read from the DestinationFromComboBox and The DestinationToCoboBox and search the database for that particular fare from the fareForm (TabPage) and check to see what time the booking has been made for.

    Because from 05:00am to 00:00 Midnight is normal time, But from 00:00 Midnight to 02:00am the price of the fare is Time and a half, But if the time is 02:00am to 05:00am the price of the fare is doubled of the normal fare.

    Next is a DestinationViaComboBox I want this DestinationComboBox to read off the Faresfrom(TabPag) using both DestinationFromTextBox  and DestinationToTextBox on the faresForm(TabPage)But the user has to insert the extra Fare into the ExtraFareTextBox Manualy on an agreed price,And when typed into the ExtraFareTextBox The sum of FareText and ExtraFareTextBox should be added to the TotalFareTextBox  else the ExtraFareTextBox has a price of nothing 0.00 so totalFareTextBox should only be the sum of FareTextBox

    next on the form is a Button Called saved ans when click it should save all data and open the daily jobs form (TabPage) to show in the list of jobs to be done.i will write more tomorrow

    Kind Regards

    Gary


    Gary Simpson

    Thursday, December 13, 2012 9:33 PM
  • Wow! This will be quite an undertaking then.

    I'll await your continuation tomorrow. Please do also let me know what sort of database you're using (SQL CE for example?).


    Please call me Frank :)

    Thursday, December 13, 2012 10:35 PM
  • Frank

    how or where do I find out what DataBase I am using?


    Gary Simpson

    Thursday, December 13, 2012 10:59 PM
  • Frank

    how or where do I find out what DataBase I am using?


    Gary Simpson

    Ok so you're using what was built-in then.

    Can you show me the schema of each table? The screenshot showing all of them was ok but I'd like to see a more clear definition of each one if possible (so it shows the type). Do you have a primary key set on each and are there any related tables?


    Please call me Frank :)

    Thursday, December 13, 2012 11:06 PM
  • Booking Schema

    Gary Simpson

    Friday, December 14, 2012 12:29 AM
  • Customer Schema

    Gary Simpson

    Friday, December 14, 2012 12:33 AM
  • Driver Schema

    Gary Simpson

    Friday, December 14, 2012 12:34 AM
  • I'll get back on this tomorrow and see if I can connect the dots.

    It's quite a lot to take in. ;-)


    Please call me Frank :)

    Friday, December 14, 2012 12:34 AM
  • Fares Schema

    Gary Simpson

    Friday, December 14, 2012 12:35 AM
  • Office Staff Schema

    Gary Simpson

    Friday, December 14, 2012 12:36 AM
  • Vehicle Schema

    Gary Simpson

    Friday, December 14, 2012 12:37 AM
  • New Tab Form

    Gary Simpson

    Friday, December 14, 2012 12:39 AM
  • Gary,

    I’m going to suggest that we take this a bit at a time here. I’m still not really seeing the whole big picture like you are, but in time I’ll get there.

    Login

    The logging in is really a separate part of the program so for now, I’m going to suggest to leave it last. I’ll create a class-level variable which will indicate that the program is to either run at level 1 (the restricted use – only certain tabs available) or level 2 (admin use – all tabs available).

    I’m not sure what tabs to have though. Can you enumerate them for me please and let me know which level they’re to be at?

    Fares Database

    Looking at this screenshot:

    I’m going to make a suggestion about changing some things with it but I’ll do that on my side so that I can then show you what I did and I’ll explain then why. I am puzzled about some things though. Can you tell me what the field (column) called “NameNumber” is and likewise what the one called “NumberName” is? What are they to be used for?

    I’m also confused here and need your help to straighten out my understanding. I see that you have a field (column) called “DestinationFrom” and “DestinationTo”. So they’re literally plotting out one complete trip here? Seems to me that would take a LOT to come up with every single possible route that someone might ask for, no?

    Is it possible that a fare could be calculated if they simply knew either how far away it is (kilometers presumably?) or how long it would take (minutes)? If so then there might be an altogether better way to do this.

    Would I be correct in assuming that this is to be used only by admin? So this is set up then in the other areas, the data is then used for them to select?


    Please call me Frank :)


    Friday, December 14, 2012 3:04 PM
  • Hi Frank

    The Continue..... On the Daily Jobs Form (TabPage)  after the insert of the booking on the booking form (TabPage) the Daily Jobs Form (Tabpage) Should Show the Particular job just inserted with two Buttons one at the begining of the Row And the other at the end of the Row. (I dont know if you have a DatagridView in mind for showing all jobs for patricular Date and Time) But if there are Advance Bookings on a different date from say the Date Today? The user should be able to see all the jobs That Are Advanced booked. so the user can tell the customer if there is a time availible otherwise the driver might get Double Booked for that day at the same time.

    The First buttonViewJob on the Daily Jobs Form(TabPage) if a user clicks this ButtonViewJob then the job Should open in the bookingForm(Tabpage) Incase a customer makes any changes to the booking ie: either cancel or change the time of the booking. then the user changes the booking if they need to then recycle the booking back to the Daily jobs Form (Tabpage) 

    The second ButtonAllocate when a user clicks this ButtonAllocate I want to check If a driver has Been Selected in The Row DriverComboBox If yes Then Save The Booking, With amended Driver Into some sort of DataBase where the Booking Job Is allocated to A driver Job Done.

    On the dailyJobsForm(Tabpage)Row should have: ButtonViewJob, Date, Time, NameNumber, DestinationFrom, DestinationTo, Number Of Seats, TotalFare, DriverCallsgn, AccountName ButtonAllocate. Something Like the Piture Below: The ComboBox in the Picture Is For the selection of a Driver.


    Gary Simpson


    Once the Job Has been Allocated. Then Remove the row of that particular job from the Daily Jobs Form (Tabpage)and save into the dataBase wich allows the DailyJobs Form (Tabpage) to refresh so the rest of the jobs that are left to do are put in order of date time
    • Edited by Gary Simpson Friday, December 14, 2012 6:27 PM added text
    Friday, December 14, 2012 6:18 PM
  • Well, keep in mind we have to account for duration - obviously if the driver is en route then he likewise can't take another during that period of time.

    Please answer what I asked earlier today though.


    Please call me Frank :)

    Friday, December 14, 2012 7:04 PM
  • Hi Frank

    the Field NameNumber is where a user puts in the house, Name or Number. or customer name if The driver Picks up from an Airport. As for NumberName this is the same as above Because you cant have a 2 textBox named the same as another in the DataBase. the NumberName is Hardley used as it is for Children who are Picked-up by a driver and the child is sometimes on thier own so a Driver will need to know what house Number or House Name.

    At the Moment there are 3 office staff all 3 man the office over a 24hr period like *hours each unless they make arrangements with each other to cover each others hours.

    at the moment there are 2 computer's in the office and yes it is for admin only


    Gary Simpson

    Friday, December 14, 2012 11:07 PM
  • Please also address this:

    "I’m also confused here and need your help to straighten out my understanding. I see that you have a field (column) called “DestinationFrom” and “DestinationTo”. So they’re literally plotting out one complete trip here? Seems to me that would take a LOT to come up with every single possible route that someone might ask for, no?

    Is it possible that a fare could be calculated if they simply knew either how far away it is (kilometers presumably?) or how long it would take (minutes)? If so then there might be an altogether better way to do this."


    Please call me Frank :)

    Friday, December 14, 2012 11:21 PM
  • Gary,

    I’m going to suggest that we take this a bit at a time here. I’m still not really seeing the whole big picture like you are, but in time I’ll get there.

    Login

    The logging in is really a separate part of the program so for now, I’m going to suggest to leave it last. I’ll create a class-level variable which will indicate that the program is to either run at level 1 (the restricted use – only certain tabs available) or level 2 (admin use – all tabs available).

    I’m not sure what tabs to have though. Can you enumerate them for me please and let me know which level they’re to be at?

    Fares Database

    Looking at this screenshot:

    I’m going to make a suggestion about changing some things with it but I’ll do that on my side so that I can then show you what I did and I’ll explain then why. I am puzzled about some things though. Can you tell me what the field (column) called “NameNumber” is and likewise what the one called “NumberName” is? What are they to be used for?

    I’m also confused here and need your help to straighten out my understanding. I see that you have a field (column) called “DestinationFrom” and “DestinationTo”. So they’re literally plotting out one complete trip here? Seems to me that would take a LOT to come up with every single possible route that someone might ask for, no?

    Is it possible that a fare could be calculated if they simply knew either how far away it is (kilometers presumably?) or how long it would take (minutes)? If so then there might be an altogether better way to do this.


     As my friend's taxi firm is small mainley he covers local distances, But with Airports and city / town runs that are out of a 20 mile radius, Do come in as a job. But not very Often.

    this is why I have said about updating the DataBase as time Goes on.

    But if the Fare Is calculated on a milage/Kilometer would that not be time consuming for office staff as they would have to wait for a responce from the computer to give a milage/Kilometer.

    where as if done my way Direct from the DataBase it will be there instantly as the user types into the DestinationFrom and DestinationTo and the Fare will be there


    Gary Simpson

    Friday, December 14, 2012 11:26 PM
  • Hi Frank

    I am asking to much of you here, and if you feel the same way I will understand

    Kind Regards

    Gary


    Gary Simpson

    Friday, December 14, 2012 11:30 PM
  • Hi Frank

    I am asking to much of you here, and if you feel the same way I will understand

    Kind Regards

    Gary


    Gary Simpson

    No, you're fine, I'm just trying to understand it all - until I do it's hard to suggest anything.

    *****

    As for taking too long, I don't know what you consider to be "too long", but let's start here: A few months back, I put the following together:

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/de660ffd-8df6-4e6e-8308-4f9876e82698

    That use Bing Maps. I don't have a timer in it, but if you'll give me two legit addresses (typical of their area), I'll run it in debug and put a stopwatch in it and tell you how long it takes. I bet it might surprise you. ;-)


    Please call me Frank :)

    Friday, December 14, 2012 11:34 PM
  • Frank

    I clicked on the link And I like your creation of the Bing Map. But how It can fit into my Taxi Programe.... Well I am Baffled !!!!! :-) and can it be linked to the Database or Booking Form.

    Also how do I control the time Factor?

    Very Nice Bit of work there Frank

    Kind Regards

    Gary


    Gary Simpson

    Saturday, December 15, 2012 12:23 AM
  • Frank

    I clicked on the link And I like your creation of the Bing Map. But how It can fit into my Taxi Programe.... Well I am Baffled !!!!! :-) and can it be linked to the Database or Booking Form.

    Also how do I control the time Factor?

    Very Nice Bit of work there Frank

    Kind Regards

    Gary


    Gary Simpson

    Yes it can be - I'll have go back and try to remember just what to do but it definitely can be. I can also get fairly precise lon/lat pairs (for each address) and if they use navigators in their taxi, then those could be input into them - so instant driving directions. What do you think of that idea?

    My thinking is that we create a database of locations which will store those lon/lat pairs. The first action will be to look to see if the database already has that location and, if not, go get the data from Bing. If I feed it lat/lon pairs, it's a lot faster (because it doesn't have to do that part), but even if it does do it, it's a few seconds at the most - normally that is.

    Give me two legit local addresses and tomorrow I'll show you the raw data that I get back on each and I think you'll get some ideas of how much more advanced your program can become by implimenting this and maybe some new ideas on how the overall thing should work.

    :)


    Please call me Frank :)

    Saturday, December 15, 2012 12:30 AM
  • From                                                             To

    North View                                                        29

    Burton End                                                        Mill Hill

    Haverhill                                                            Haverhill

    Suffolk                                                               Suffolk

    Cb9 9AD                                                            Cb9 8BT

    here are 2 addresses that you could use it's in the uk


    Gary Simpson


    • Edited by Gary Simpson Saturday, December 15, 2012 12:57 AM
    Saturday, December 15, 2012 12:40 AM
  • From                                                             To

    North View                                                        29

    Burton End                                                        Mill Hill

    Haverhill                                                            Haverhill

    Suffolk                                                               Suffolk

    Cb9 9AD                                                            Cb9 8BT

    here are 2 addresses that you could use it's in the uk


    Gary Simpson


    Gary,

    Would you show me how the addresses would look if they were on an envelope? It's not returning anything and I feel sure that's because I don't understand how the address is correctly formed.


    Please call me Frank :)

    Saturday, December 15, 2012 2:05 PM
  •       

    From:

    North View

    Burton End

    Haverhill

    Suffolk

    CB9 9AD

    To:

    29 Mill Hill

    Haverhill

    Suffolk

    CB9 8BT

                                                                                 


    Gary Simpson

    Saturday, December 15, 2012 2:38 PM
  • Ok let me see what I can come up with using it that way.

    Please call me Frank :)

    Saturday, December 15, 2012 2:41 PM
  • Using the program that I showed you last night, it returned this:

    If you'll give me a little while though, I'll run that in debug so I can show you the actual return data in XML.

    Be back in a bit...


    Please call me Frank :)

    Saturday, December 15, 2012 2:51 PM
  • Try NorthView instead of North view


    Gary Simpson

    Saturday, December 15, 2012 3:06 PM
  • this really looks good Frank ;-)

    Gary Simpson

    Saturday, December 15, 2012 3:14 PM
  • this really looks good Frank ;-)

    Gary Simpson

    Have a look here:

    {URL Removed}

    Let me know when you've viewed it because I need to pull it once you do (I'm not supposed to reproduce that information but I wanted to show you what's actually returned).


    Please call me Frank :)


    Saturday, December 15, 2012 3:17 PM
  • I have see it frank

    Gary Simpson

    Saturday, December 15, 2012 3:52 PM
  • I have see it frank

    Gary Simpson

    Ok I've pulled it.

    Tell me your thoughts about using it?


    Please call me Frank :)

    Saturday, December 15, 2012 3:57 PM
  • this looks Brilliant Frank,

    But I do Have Another Question or two,

    What if the server crashes?

    and how would the user get a price into the FareTextBox, and there has to be a mimimum fare? 


    Gary Simpson

    Saturday, December 15, 2012 4:03 PM
  • this looks Brilliant Frank,

    But I do Have Another Question or two,

    What if the server crashes?

    and how would the user get a price into the FareTextBox, and there has to be a mimimum fare? 


    Gary Simpson

    That is possible of course. It's also possible that you give it a completely legitimate address that it can't find. Just because Bing doesn't know about doesn't mean it's not there!

    As for the minimum, that's up to your business rules. If you want to have it use a minimum then we can do that.

    How would you come up with the price though? Would you use distance or time? My thought was this: Whichever you use (distance or time), that's a minimum requirement for admin to set up a "trip". So it goes back to your idea of storing all "trips", but in the entry form will be either distance or time, or whatever you come up with.

    If Bing can't find it or they're down, then the user has to choose to either wait or to estimate it on their own.

    Your thoughts?


    Please call me Frank :)

    Saturday, December 15, 2012 4:08 PM
  • How would you come up with the price though? Would you use distance or time? My thought was this: Whichever you use (distance or time), that's a minimum requirement for admin to set up a "trip". So it goes back to your idea of storing all "trips", but in the entry form will be either distance or time, or whatever you come up with.

    Yes The price of a fare is based on mileage. and the time factor only comes into play after midnight and again after 02:00am any other time is normal time for 4 seat vehicle. but as you know a 6 seat vehicle is time and a half fare of the 4 seat vehicle normal price. and 8seat Vehicle is Double Fare of the 4 seat Normal time fare.... WOw Did I type this..

    Gary Simpson

    Saturday, December 15, 2012 4:55 PM
  • Gary,

    I won’t lie – you probably have told me about the hours and charges but it’s been a long thread and often I wasn’t understanding even what was going on so at that point, tell me the structure of the charges was fairly futile.

    I’ll review them again and see if I understand all of it, but as a starting point, let me ask you about nomenclatures of addresses there.

    In the U.S., the following would be a typical layout of an address:

    Field Name

    Typical Value

    Street Address

    123 Main Street

    City

    Nashville

    State

    Tennessee

    Zip Code

    37221

    Alternately the street address may have a second line:

    Field Name

    Typical Value

    Street Address 1

    123 Main Street

    Street Address 2

    Second Floor, Suite 123

    City

    Nashville

    State

    Tennessee

    Zip Code

    37221

    Could I get you to take one of those addresses used earlier and tell me the names that would be used for the fields of information?

    Also, in the above you said "mileage" - do you mean literally or do you mean kilometers?


    Please call me Frank :)

    Saturday, December 15, 2012 5:18 PM
  • Frank.

    yes I do work with Mileage. and here are 2 different Address layouts

    Address Layout


    Gary Simpson

    Saturday, December 15, 2012 6:51 PM
  • Gary,

    Do you want to have it set up that a residence uses a different DataTable than a business does?


    Please call me Frank :)

    Saturday, December 15, 2012 7:13 PM
  • if it can be please frank

    Gary Simpson

    Saturday, December 15, 2012 7:21 PM
  • if it can be please frank

    Gary Simpson

    Ok - I'm going to put together two proposed DataTable layouts and make sure we're on the same page and in agreement with the structure.

    Following that (probably tomorrow) I'll start putting an actual program together for the first part which is what the admin will use to enter these and then give them the OPTION to use Bing to get the distance (otherwise they can just type it in themselves).

    Can you tell me the rate-per-mile for standard fare or will this vary and they need to enter it each time?


    Please call me Frank :)

    Saturday, December 15, 2012 7:26 PM
  • Frank Here is the code I had for the FARESForm

    Public Class FaresForm
        Private Sub FaresTableBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs)
            Me.Validate()
            Me.FaresTableBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.GarysTaxiDataBaseDataSet1)
        End Sub
        Private Sub FaresTableBindingNavigatorSaveItem_Click_1(sender As System.Object, e As System.EventArgs) Handles FaresTableBindingNavigatorSaveItem.Click
            Me.Validate()
            Me.FaresTableBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.GarysTaxiDataBaseDataSet1)
        End Sub
        Private Sub FaresForm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the 'GarysTaxiDataBaseDataSet1.FaresTable' table. You can move, or remove it, as needed.
            Me.FaresTableTableAdapter.Fill(Me.GarysTaxiDataBaseDataSet1.FaresTable)
        End Sub
        Function RoundUp(ByVal Input As Decimal, ByVal Mult As Decimal) As Decimal
            Return CDec(Int(((Input * Mult) + 0.05) * 10) / 10)
            'This is a Roundup of a sum used when you Insert a amount Into Insert FareTextBox
            ' And if the sum in Time_Half TextBox Ends with a 0.05 The This Round up sum will
            'Round 0.05 to 0.10....'
            'So please REMEMBER when Inserting a Amount into the InsertFareTextbox.
            'Only Insert Values that end with a Zero, 0, Example(1.00, 1.10, 1.50 ...ect) 
            'AND NOT Values that end with a 5 (1.05, 1.15, 1.55...ect)
        End Function
        
        Private Sub InsertFareTextBoxTextBox_TextChanged(sender As System.Object, e As System.EventArgs) Handles InsertFareTextBoxTextBox.TextChanged
            Dim InsertFare As Decimal
            If Decimal.TryParse(InsertFareTextBoxTextBox.Text, InsertFare) Then
                'This InsertFareTextBox is where I insert the Fare amount of that it costs from detination
                'To Destination I require and starts the process below.
                NormalFare4TextBox.Text = FormatCurrency(InsertFare)
                'This NormalFareTextBox = the ammount put into InsertFareTextBox
                TimeHalfFare4TextBox.Text = FormatCurrency(InsertFare * 1.5)
                'This TimeHalfFareTextBox = NormalFareTextBox and then Times by 1.5 
                TimeHalfFare4TextBox.Text = FormatCurrency(RoundUp(InsertFare, CDec(1.5)))
                'And the round function rounds the last digit to 0.10 ect But only if the sum is 0.05 ect
                DoubleFare4TextBox.Text = FormatCurrency(InsertFare * 2)
                'This DoubleFareTextBox = NormalFareTextBox and then Times by 2
                NormalFare6TextBox.Text = FormatCurrency(InsertFare * 1.5)
                'This Normal6_FareTextBox.Text = the amount of InsertFareTextBox and then times by 1.5
                NormalFare6TextBox.Text = FormatCurrency(RoundUp(InsertFare, CDec(1.5)))
                'And the round function rounds the last digit to 0.10 ect But only if the sum is 0.05 ect
                TimeHalfFare6TextBox.Text = FormatCurrency(CDbl(NormalFare6TextBox.Text) * 1.5)
                'this Time_Half6_FareTextBox = Normal6_FareTextBox and then times by 1.5
                TimeHalfFare6TextBox.Text = FormatCurrency(RoundUp(CDec(NormalFare6TextBox .Text), CDec(CDbl(1.5))))
                DoubleFare6TextBox.Text = FormatCurrency(CDbl(NormalFare6TextBox.Text) * 2)
                'This Time_Half6_FareTextBox = Normal6_FareTextBox and then times by 2
                NormalFare8TextBox.Text = FormatCurrency(InsertFare * 3)
                'This Normal8_TextBox = NormalFareTextBox and then times by 3
                TimeHalfFare8TextBox.Text = FormatCurrency(CDbl(NormalFare8TextBox.Text) * 1.5)
                'This Time_Half8_FareTextBox = Normal8_TextBox and then times by 1.5
                TimeHalfFare8TextBox.Text = FormatCurrency(RoundUp(CDec(CDbl(NormalFare8TextBox.Text)), CDec(CDbl(1.5))))
                'This Time_Half8_FareTextBox = Time_Half8_FareTextBox and then times by 1.5
                'And the round function rounds the last digit to 0.10 ect But only if the sum is 0.05 ect
                DoubleFare8TextBox.Text = FormatCurrency(CDbl(NormalFare8TextBox.Text) * 2)
                'This Double8_FareTextBox = Normal8_TextBox.Text and then times by 2
            Else
                MessageBox.Show("Enter a valid fare amount", "Numeric Only", MessageBoxButtons.RetryCancel, MessageBoxIcon.Exclamation)
                'This is a message that will be shown if an invalid key is pressed
            End If
        End Sub
        Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
            'This Timer1 Supplies Label1 with the day, Date, Time
            Select Case Weekday(Now)
                Case Is = vbSaturday
                    Label1.Text = "Today is Saturday     " + Today + "    " + TimeOfDay
                Case Is = vbSunday
                    Label1.Text = "Today is Sunday     " + Today + "    " + TimeOfDay
                Case Is = vbMonday
                    Label1.Text = "Today is Monday     " + Today + "    " + TimeOfDay
                Case Is = vbTuesday
                    Label1.Text = "Today is Tuesday     " + Today + "    " + TimeOfDay
                Case Is = vbWednesday
                    Label1.Text = "Today is Wednesday     " + Today + "    " + TimeOfDay
                Case Is = vbThursday
                    Label1.Text = "Today is Thursday     " + Today + "    " + TimeOfDay
                Case Is = vbFriday
                    Label1.Text = "Today is Friday     " + Today + "    " + TimeOfDay
            End Select
        End Sub
        
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
            'Open'Customer Account Form
            CustomerAccountForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
            'Open's Vehicle Form
            VehicleForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
            'Open's Fares Form
        End Sub
        Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
            'Open's Staff Form
            StaffForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
            'Open's Drivers Form
            DriverForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
            'Open's Booking Form
            BookingForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click
            'Open's Login Form
        End Sub
        Private Sub Button8_Click(sender As System.Object, e As System.EventArgs) Handles Button8.Click
            'Open's Menu Form
            MenuForm.Show()
            Me.Hide()
        End Sub
        Private Sub Button9_Click(sender As System.Object, e As System.EventArgs) Handles Button9.Click
            'Adds New Booking
        End Sub
        Private Sub Button10_Click(sender As System.Object, e As System.EventArgs) Handles Button10.Click
            'Save New Booking
            FaresTableBindingNavigatorSaveItem.PerformClick()
        End Sub
        Private Sub Button11_Click(sender As System.Object, e As System.EventArgs) Handles Button11.Click
            'Delete's Booking
        End Sub
        Private Sub Button12_Click(sender As System.Object, e As System.EventArgs) Handles Button12.Click
            'Exit's the programe
            MsgBox("Gary's Programe Is Now Closing")
            Application.Exit()
        End Sub
        Private Sub BackColourToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackColourToolStripMenuItem.Click
            ' You can choose the Back Color of the form
            ColorDialog1.ShowDialog()
            Me.BackColor = ColorDialog1.Color
            My.Settings.BackColor = ColorDialog1.Color
        End Sub
        Private Sub FontColourToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles FontColourToolStripMenuItem.Click
            ColorDialog1.ShowDialog()
            Me.ForeColor = ColorDialog1.Color
            My.Settings.ForeColor = ColorDialog1.Color
        End Sub
        Private Sub ExitToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ExitToolStripMenuItem.Click
            ' Exit the Programe
            Application.Exit()
        End Sub
        Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click
        End Sub
    End Class

    But Please Disregard GarysTaxiDataBaseDataSet1 as it is an old one

    Old Fares Form


    Gary Simpson

    Saturday, December 15, 2012 7:37 PM
  • I remember seeing that and thinking that we need to rethink that in its entirety, but don't worry about that part - I'll do it. I just need to know the rules of the game.

    Is the fare always a given cost per mile (with a minimum) or is that something only the admin can decide per trip?


    Please call me Frank :)

    Saturday, December 15, 2012 7:43 PM
  • I remember seeing that and thinking that we need to rethink that in its entirety, but don't worry about that part - I'll do it. I just need to know the rules of the game.

    Is the fare always a given cost per mile (with a minimum) or is that something only the admin can decide per trip?


    Please call me Frank :)


    Its something only Admin Decide

    Gary Simpson

    Saturday, December 15, 2012 9:14 PM
  • Its something only Admin Decide

    Ok, I'll do more on it tomorrow then. I need to take off at the top of the hour so I'll be back with it tomorrow.


    Please call me Frank :)

    Saturday, December 15, 2012 9:16 PM
  • Gary,

    On this:

    Can you tell me what you mean by "InsertFare"? Am I correct that there are four possible fare types? Normal, 4-Seat, 6-Seat, and 8-Seat?

    Please call me Frank :)

    Sunday, December 16, 2012 4:04 PM
  • Hi Frank

    The InsertFareTexbox was going to be used just for the faresForm.

    When Admin insert a fare It will atomatically fill out all the other Boxes as in picture below:

    Fares Form after Insert fare textBox has fare in it


    Gary Simpson

    Sunday, December 16, 2012 5:33 PM
  • I'm ascetaining from that there are only three types of fares then: Normal (four seat), six seat and eight seat, would that be correct?

    From what I see above, it's just the duplication of data - which we could do in the program if you want but there's no point in storing the data twice, agree?


    Please call me Frank :)

    Sunday, December 16, 2012 5:38 PM
  • yes Frank.

    3 types of fare for 3 different Vehicle Types

    also 3 Different types of fare Normal, Time Half , Double depending on the time of day


    Gary Simpson

    Sunday, December 16, 2012 5:56 PM
  • Frank

    could it also be done just incase the server go down then they will have a back-up that they can work from. is that possible 


    Gary Simpson


    Sunday, December 16, 2012 5:58 PM
  • yes Frank.

    3 types of fare for 3 different Vehicle Types

    also 3 Different types of fare Normal, Time Half , Double depending on the time of day


    Gary Simpson


    Ok let me see if I can put together a structure of some sort to propose.

    Please call me Frank :)

    Sunday, December 16, 2012 6:06 PM
  • Frank

    could it also be done just incase the server go down then they will have a back-up that they can work from. is that possible 


    Gary Simpson



    I assume you mean the Bing server? I'm not following your question.

    Please call me Frank :)

    Sunday, December 16, 2012 6:07 PM
  • Gary,

    My thoughts about this first part – fares created by admin – follows. In my mind, there needs to be two different DataTables that are in use here: One for locations and the other for the actual itinerary (the route).

    Preface For All DataTables

    In the following, the very first item is something I’ve gotten in the habit of doing and it’s worked out well. That’s to create an entry which is a BigInteger (that would be the same as type ‘Long’ to us), set it to be an identity column, and set the primary key on that.

    In essence that one takes care of itself; it’s like an “auto-number” field in Access for example. Doing it this way has proven worthwhile.

    Locations Table

    What I have in mind for the locations table is shown below:

    You can see that what I’ve done is to take what you wrote last night and combine business and residential into the same table. There’s also a field for the type which will be either business or residential. We can later allow the user to filter on the type they want for various operations.

    Given that it’s for both business and residential, none of them will be filled out completely for obvious reasons. I’ll be sure that whichever fields aren’t filled out, those are set to string.empty so that we avoid nulls which can plague you forever (speaking from experience here!).

    You’ll also see latitude and longitude in it. That’s for Bing to help with but I’ll have it so that it’s not mandatory. That will later be used in the routes to get the distance.

    If you want – and please let me know – I can also have it store things like the directions and maps (I would suggest storing the URL, not the actual image) but if you have no purpose for them then we won’t bother doing that.

    Moving on though, there’s another reason I want to use that. One important part of any of this is to ensure that the user doesn’t duplicate information. Makes sense, but herein lies a problem if we just use the address:

    • 123 Main Street
    • 123 Main St.

    See? To the program, no those aren’t the same but you and I both know they are! If we can resolve it to a lat/lon pair though, that will be the same and then we can know not to allow it to be added because it’s already in the datatable.

    So their first job will be to add a list of locations. With those in place, they can then create a route. Let me note here that if the fare amount (based on mileage) could be calculated rather than something that only admin dictates per route, this step would be totally eliminated. You might want to get with the owners and discuss this. It’s a lot of work on their part that can be avoided if they can tell us the “rules” for calculating the route cost based on distance.

    Routes

    The routes datatable looks like the following:

    Notice the fields called “RouteStartLocation_Ref” and “RouteEndLocation_Ref”. These are also type BigInteger and they’ll be what we set the relation on. In operation, the user will select a location to start at from the Locations table, select a location to end at from the Locations table, and those fields will store the IDX number of each location.

    The rest should be fairly obvious for what they are and what they’re to be used for.

    Tell me your thoughts please?


    Please call me Frank :)

    Sunday, December 16, 2012 7:20 PM
  • Hi Frank

    Wow I dont know what to say about all the work you have put into this project it is beging to look like well nothing I could do,

    and as for saving the directions would be a very good thing to have for hard to find Addresses and for Office staff (Admin) could talk the driver to the destination. or even better print of the directions to give to the Driver.

    My thoughts on Mileage, could you put some sort of option let's say on an option Form so Admin can either put their Mileage rate into a textBox. or select to enter fares themselves would that be to much work for you.

    and looking at the Edit Table Route. why is it you name the column's better than me?

    Well Done Frank and thank you very much For what you are doing for me


    Gary Simpson

    Sunday, December 16, 2012 8:30 PM
  • Gary,

    Sure, I had in mind that anything “Bing related” would be either optional or editable. So if they can’t reach Bing for a lat/lon (how about let’s also have a utility that will ripple through and look at any which are 0/0 and try Bing again), then it just won’t be used. If the lat/lon pair is 0/0, that will expose the possibility that there may be a duplicate but … what else can you do if it can’t reach the Bing server for any of a thousand reasons.

    As for the directions/maps, I can get those and add them but do the taxi’s have GPS-based navigators? If so then a latitude and longitude will all those to get the directions for them. It’s just a thought of course.

    In the fares, I thought you said that was to be completely up to admin to do so I had in mind all along it would be an editable field. It can the calculate the other stuff though because that’s simple math (time-and-a-half and double-time).

    Think about it though – there will be tens of thousands of locations and a fair number of routes. For the owners to do all this in advance, holy smoke what a lot of work!

    What do you think about contacting the owners tomorrow and explain this:

    “If you can tell me how to calculate the fare – however complex it is – let’s let the program do it and then the normal users will do the work as they need it.

    It will either locate it in the database or it will use Bing and that will then be added in and saved. You won’t have to do all that work in advance and they won’t have to wait on you to add something new.”

    That sure seems to me like the best way to go.

    All we need to know are the rules of the road and we can make it do whatever they come up. They’re doing something now – so they have some sort of rules they’re using. Surely by now they know what those rules are! We can also make it so that the rules are adjustable as time goes on and that it updates all records to reflect those new rules.

    Give it some thought.

    FYI: This next week I’ll be somewhat busy at my ‘real work’ (I’m a mechanical engineer, not a programmer!) as it’s the last week before I take two weeks off for vacation. I just wanted to say in advance that I hope you won’t think I’m ignoring things here, it’s just … well … it’s my job! ;-)


    Please call me Frank :)

    Sunday, December 16, 2012 9:01 PM
  • I have just spoken to my mate he said the Mileage rate is a £1.00 a mile And the Minimum fare is £3.50 for a 4 seat car,

    He also said that Hospitals and Airports are at a fixed rate. but still on a time factor and vehicle seats. like 4 seater.


    Gary Simpson

    Sunday, December 16, 2012 10:17 PM
  • I have just spoken to my mate he said the Mileage rate is a £1.00 a mile And the Minimum fare is £3.50 for a 4 seat car,

    He also said that Hospitals and Airports are at a fixed rate. but still on a time factor and vehicle seats. like 4 seater.


    Gary Simpson

    Ok I'll see how far I can get with this first part tomorrow then.

    I'll report back with updates.


    Please call me Frank :)

    Sunday, December 16, 2012 11:32 PM
  • Frank

    Could there Be an Options Form Like a checkBox and if checked then work from the database.

    and a textBox Enabled If the checkBox is unchecked so they could put there own rate into the textBox "for the Mileage rate"


    Gary Simpson

    Monday, December 17, 2012 3:59 PM
  • Frank

    Could there Be an Options Form Like a checkBox and if checked then work from the database.

    and a textBox Enabled If the checkBox is unchecked so they could put there own rate into the textBox "for the Mileage rate"


    Gary Simpson


    It'll be a while before I can get back to this, but when I do, I'll put together a first go with it, even if it has to be redone later (which isn't uncommon). That'll give us the ideas we need to improve it and figure out all of the options that should be there, etc..

    Please call me Frank :)

    Monday, December 17, 2012 4:55 PM
  • Gary,

    I need for you to get a Bing API key then I'll explain what to do with that key. You can get that from here:

    http://www.bingmapsportal.com/

    *****

    I was thinking about something. For a business, there's a business name but for a residence, there is none. When the user gets to the routes, they'll need to select (or create) a location. Shouldn't there be some sort of name so that's what's displayed?


    Please call me Frank :)

    Monday, December 17, 2012 9:03 PM
  • Hi Frank

    I have got the key

    As for residential name's the name of the person to be picked up will survice.

    or are you talking about the address where house's have names instead of number's


    Gary Simpson

    Tuesday, December 18, 2012 1:48 AM
  • Gary,

    I guess the best thing to do is to wait until I have a working sample - then things will be more clear I think.

    With the API key, how about open Notepad and type that in. Please be sure NOT to hit <ENTER> afterward - I can set it up that it won't matter but presently that's not how I have it.

    Anyway, please name the file as follows:

    Bing_API_Key.txt

    ...and put it on your desktop.

    That way, I can share the program with you (when I have something - which I don't know when to say that will be) without exposing my key number and it will work on your end without me knowing yours.

    This is only temporary of course, but while it's being worked on I think it's a good way to work it then later when it's time to deploy it to your customer, you can put the key number directly into the code so that it's compiled and isn't anywhere in a file on their computer.


    Please call me Frank :)

    Tuesday, December 18, 2012 1:30 PM
  • Hi Frank

    is there a way I could send you my key or is it not advisable.

    also here is some sort of Details and some settings I thought of....

    Details and settings


    Gary Simpson

    Tuesday, December 18, 2012 3:21 PM
  • Hang on to your thoughts but I'm nowhere near there yet!

    As for the API key, there's really no way to do that and not risk it being compromised. If you'll just create the text file like I described earlier then put it on your desktop it should work.

    If you want to, please do that and I'll zip up where I presently am and upload it so you can make sure it works?


    Please call me Frank :)

    Tuesday, December 18, 2012 3:35 PM
  • Gary,

    I haven't heard from you but I have to be out most of tomorrow starting early so I wanted you to try out "where I am" with the program when you can please.

    http://www.fls-online.com/VBNet_Forum/12-18-12/Gary.zip

    Run it in debug mode and make sure, first, that it works. If it doesn't then let me know what failed. If it does work, then I'd like to explain just what I meant about a name for residential and how I think that even in this first small step, we need to re-think how it should work.

    I'll be back at some point tomorrow afternoon (I'm in U.S. Central time zone) and I'll have a look then at your findings.

    Please do understand this before you even download it: My layout is for functionality and not "pretty" - you can manipulate or even totally redo everything later, but the important part isn't what it looks like, so do keep that in mind. ;-)


    Please call me Frank :)

    Wednesday, December 19, 2012 3:53 AM
  • Hi Frank

    I have Downloaded and Looked at your creation "Wow" Looking goodI have Taken Some Screen Shots. I dont know how far you have got. But When I clicked Modify or View all Nothing Happend

    I assume this code was not in yet. I did get Warning Message saying about Bing But that is probably due to me not having put that API key in.


    Gary Simpson

    Wednesday, December 19, 2012 4:38 PM

  • Gary Simpson

    Wednesday, December 19, 2012 4:40 PM
  • Frank

    I think there should be Another TextBox In the Business Address. Unless The BuinessIdentifierTextBox is part of the Address.? 

    As I said before View all And the modify does not work but i think thats down to the code not in there yet.

    Frank I really think this will work well Thank you Frank

    Kind Regards

    Gary


    Gary Simpson

    Wednesday, December 19, 2012 4:54 PM
  • I've been out since early this morning and just getting back. I have some catching up to (work-related), so I'll reply later, but no those other sections aren't hooked up yet, I just have them there as placeholders.

    It had to have found your Bing key though because it wouldn't have gotten that far if it didn't. You did, I assume, write the text file and put it on your desktop, right?

    It does NOT save anything yet. The code is in it but commented out because it's all just a test at this point. The one that you showed me that indicated a duplicate - was it in fact a duplicate? The one that indicated that Bing couldn't find it, can you give me that address and let me see what it does step at a time in the code?

    It may be tomorrow getting back to this, but I have to attend to "real work" first. I'm sure you understand.


    Please call me Frank :)

    Wednesday, December 19, 2012 7:59 PM
  • Frank 

    Of coarse i understand Frank, your life comes before this, and i really do apreciate what you have done so far for me.

    yes that address was a duplicte.  Here is that address in the picture.....

    29 Mill Hill Haverhill Suffolk CB9 8BT


    Gary Simpson

    Wednesday, December 19, 2012 9:45 PM
  • Gary,

    I tried this and it went through fine. It might have just been that the Bing server was out then. That's really the purpose of the dialog - to let them know it couldn't be found. I'm thinking now that the dialog might also should have a "Retry" and if clicked, they can try it again.

    Your thoughts?


    Please call me Frank :)

    Thursday, December 20, 2012 2:06 PM
  • Hi Frank

    I have tried it again but no joy. I have changed the backColor becuase it it easier to find in my pictures.

    I have Even tried putting in the Postcode without a gap


    Gary Simpson

    Thursday, December 20, 2012 3:45 PM
  • Gary,

    Oddly mine does return it:

    I’m curious why you modified the Post Code though? The other one had a different one but in both cases they worked on my end.

    I’d like to get you to do something if you would please – I might have to rethink this whole thing.

    If you’ll go to the code view, how about put a breakpoint in as shown below:

    Enter that same information then click the button to get the information from Bing. As you see there, it’s first looking to see if it returns the “OK” from the server. I’d like to know if it did or not.


    Please call me Frank :)

    Thursday, December 20, 2012 4:03 PM
  • I have done what you asked ............... this is the error I am getting


    Gary Simpson

    Thursday, December 20, 2012 7:17 PM
  • Interesting - so it's rejecting your Bing API key.

    You said yesterday that some of them worked? Right?

    If so, would you try those again? (remove the breakpoint - it'll just be a distraction).


    Please call me Frank :)

    Thursday, December 20, 2012 7:32 PM
  • Frank

    The only thing that worked was that message saying about Bing and do I want to save the address

    The longditue and Latitude has never worked for me ;)

    I dont know If I had to put my key in


    Gary Simpson

    Thursday, December 20, 2012 7:40 PM
  • Frank

    The only thing that worked was that message saying about Bing and do I want to save the address

    The longditue and Latitude has never worked for me ;)

    I dont know If I had to put my key in


    Gary Simpson

    Oh I misunderstood then. I was worn out when I got back yesterday - I should have waited. ;-)

    Did you create the text file and put it on your desktop and name it like I asked? It's coded so that it shouldn't even start if it can't find the file, but of course the contents of the file is another story.

    Let me know about this then I'll explain from there. I didn't put a lot into this part because it's all temporary.


    Please call me Frank :)

    Thursday, December 20, 2012 7:44 PM
  • Frank

    Yes I had done what you said and put it on my desktop.


    Gary Simpson

    Thursday, December 20, 2012 8:02 PM
  • Frank

    Yes I had done what you said and put it on my desktop.


    Gary Simpson

    How about go to code view and at the top (line 32, specifically), modify it to add this so we can know that it's reading your file correctly:

    If My.Computer.FileSystem.FileExists(bingFilePath) Then bingAPI_Key = My.Computer.FileSystem.ReadAllText(bingFilePath) ' ' ============================================================= ' Remove this after you're sure that the following messagebox ' shows your API key correctly: ' MessageBox.Show("My API Key is:" & vbCrLf & vbCrLf & _ bingAPI_Key, "API Key", MessageBoxButtons.OK, _ MessageBoxIcon.Information) ' ' ============================================================= ' Else MessageBox.Show("The Bing API Key file was not located.", "No Bing!", _ MessageBoxButtons.OK, MessageBoxIcon.Warning) Close() End If



    Please call me Frank :)

    Thursday, December 20, 2012 8:07 PM
  • Hi Frank

    yes it does  show my Key I have reverted back to original code now


    Gary Simpson

    Thursday, December 20, 2012 8:37 PM
  • Hi Frank

    yes it does  show my Key I have reverted back to original code now


    Gary Simpson

    Well something is weird here - how about go back to the site for Bing and poke around, I don't know, but you got an "unauthorized" error which indicates that it's not recognizing your number as being valid.

    You might even just want to have it generate another one. Please be sure that you copy it exactly though - no line breaks or anything.


    Please call me Frank :)

    Thursday, December 20, 2012 8:40 PM
  • Frank I have been back to the bing site

    what should I put in the url box? or do I leave it blank.


    Gary Simpson

    Thursday, December 20, 2012 8:58 PM
  • Frank I have been back to the bing site

    what should I put in the url box? or do I leave it blank.


    Gary Simpson

    Well, that's a good question. I don't remember how I set mine up as it was a while back, but if you want to, just use mine:

    http://www.fls-online.com/


    Please call me Frank :)

    Thursday, December 20, 2012 9:02 PM
  • Frank

    I what I have Done is copied n pasted into my desktop Bing_API_Key and it works now.


    Gary Simpson

    Thursday, December 20, 2012 9:30 PM
  • Frank

    I what I have Done is copied n pasted into my desktop Bing_API_Key and it works now.


    Gary Simpson

    Great!

    Experiment with it a bit now that it's actually working then tell me your thoughts on it at this point.

    I'll later explain what I was talking about the other night regarding a name for the residential locations and some things that I think should be changed regarding some of the logic used.


    Please call me Frank :)

    Thursday, December 20, 2012 9:32 PM
  • Hi Frank

    What If one was to pick-up a customer From a Industrial est, and they don't know the actual Postal Address /postcode, what would happen there?

    I know they can say they are waiting outside "Mothercare" on a Street,  But how would that be put into the booking form?

    Yes I really like this setup your Brilliant Frank. :-). I have even tried putting in a postcode with only the first digits and it still gave me long/lat

    Kind regards

    Gary


    Gary Simpson

    Thursday, December 20, 2012 9:52 PM
  • Gary,

    When I was experimenting with it Tuesday, it occurred to me that my logic doesn’t allow for some things which are perfectly rightful. As an example, consider the following example:

    Business Name: ABC CBA
    Business Identifier: Unit 7
    Street Address 1: 1st Floor
    Street Address 2: 110 Hollands Road
    Count: Suffolk
    Post Code: CB9 7HY

    Now we go to add another business:

    Business Name: XYZ
    Business Identifier: Unit 12
    Street Address 1: 8th Floor
    Street Address 2: 110 Hollands Road
    Count: Suffolk
    Post Code: CB9 7HY

    The program, currently, wouldn’t allow it because the only thing that it’s looking at is the returned latitude/longitude. However, with an office building what I just showed is certainly reasonable – so you see the issue because of only looking at lat/lon.

    My thinking now is that it makes a comparison which includes the business name. I can do that easily, but I’d like your thoughts on it first.

    Now let’s move to residential and what I meant the other night. Would it be possible (or prudent) to have a name for residences also? Certainly more than one person can live at a given residence.

    Give it some thought at let me know.

    * ****

    Reading your last reply, how would you want it to work? I can see how that might happen also, yes.


    Please call me Frank :)

    Thursday, December 20, 2012 10:02 PM
  • Frank

    Here is a residence address: with a senario to a hospital from a residencial (old age people's home)

    FROM flat9 Horace eves,

    Withersfield Road, Haverhill, Suffolk, CB9 9JH

    To Addenbrooks Hospital

    Cambridge University Hospitals NHS Foundation Trust

    Cambridge Biomedical Campus

    Hills Road

    Cambridge
    CB2 0QQ

    return @ 14:30 Mrs A Smith

    From

    Cambridge University Hospitals NHS Foundation Trust

    Cambridge Biomedical Campus

    Hills Road

    Cambridge

    CB2 0QQ

    To

    flat 9

    Horace eves

    withersfield Road

    Haverhill

    Suffolk

    CB9 9JH


    Gary Simpson

    Thursday, December 20, 2012 10:36 PM
  • I'm not sure that answered my questions. ;-o

    That's a route information though, not a location, correct? In fact it's TWO DIFFERENT ones that you showed - correct? If is't all just one then I am indeed confused!

    *****

    I'm thinking about something, the more involved it gets. I'm wondering now if there should be any difference in location types (i.e., not a "business" versus "residence", just all lumped into one called a "location"). Whatever fields aren't known, they're filled in with default empty strings. If Bing can find it, then it's legit and if not, then it's not accepted.

    What do you think?


    Please call me Frank :)

    Thursday, December 20, 2012 10:44 PM
  • Frank

    Yes it is two different locations but this is the type of work they mainly do, as long as a user can type in a destination from and a destination To and have a result/value of that fare this would be fine, But using bing is an added bonus because of the route information and longditude/latitude.

    But how would this work from just Locations only. it might be good to combined Business and residential Addresses because the user/ admin only needs to fill out a location once. but i still cant see how this would work from just a location database. like location from a & to b. only you know what this programe Visual Studio/Basic can do out of the two of us :-)


    Gary Simpson

    Thursday, December 20, 2012 11:52 PM
  • Frank

    Yes it is two different locations but this is the type of work they mainly do, as long as a user can type in a destination from and a destination To and have a result/value of that fare this would be fine, But using bing is an added bonus because of the route information and longditude/latitude.

    But how would this work from just Locations only. it might be good to combined Business and residential Addresses because the user/ admin only needs to fill out a location once. but i still cant see how this would work from just a location database. like location from a & to b. only you know what this programe Visual Studio/Basic can do out of the two of us :-)


    Gary Simpson

    I want to think some more about this. One of the problems is that you're in the business and I'm an outsider that has no knowledge of the business, so it's difficult for me to surmise what I need to. You can imagine being the user of the program where I can't.

    But my thoughts is that the next step - routes (which is what I *think* you're calling a fare so maybe I should change my terminology) - will need two main pieces of information: Where from and where two.

    Other information will be added but those first two (each a "location") can either be selected from those which are already in the locations table -OR- it can be created on the spot (and then added to the locations table for later use). Given that, I wanted to have a way to manually just "add/edit" a location and that's where I was starting.

    Is that along the same lines you're thinking?


    Please call me Frank :)

    Friday, December 21, 2012 12:08 AM
  • Frank

    yes we do need Locations, Either via Bing Or via a Database. Both way should have "From and To destinations" which will give a fare/Price ($/£) for that destination from/To.

    Other information will be added but those first two (each a "location") can either be selected from those which are already in the locations table -OR- it can be created on the spot (and then added to the locations table for later use). Given that, I wanted to have a way to manually just "add/edit" a location and that's where I was starting.

    Your words above are are correct


    Gary Simpson

    Friday, December 21, 2012 12:31 AM
  • Ok - I'll try to do more on it tomorrow combining some of this and maybe even starting again on some of it.

    I'll be a while on it before I get back but I'll try to get this first part done completely before I give you the next update to it.


    Please call me Frank :)

    Friday, December 21, 2012 12:34 AM
  • Thank you Frank ;-)

    Gary Simpson

    Friday, December 21, 2012 12:54 AM
  • Frank

    I have been Playing with your programe you sent me, I have found a floor with the bing longditude/latitude. it does not check if the postcode is the right one for the Address typed in and if you try an Address yourself and only put some of your postcode in look at the longditude/latitude result then put in the postcode in full and then check the longditude/latitude against the first result.

    could the Bing work with just the Address only then put the postcode in the Address Postcode automatically,


    Gary Simpson

    Friday, December 21, 2012 2:24 AM
  • Frank

    I have been Playing with your programe you sent me, I have found a floor with the bing longditude/latitude. it does not check if the postcode is the right one for the Address typed in and if you try an Address yourself and only put some of your postcode in look at the longditude/latitude result then put in the postcode in full and then check the longditude/latitude against the first result.

    could the Bing work with just the Address only then put the postcode in the Address Postcode automatically,


    Gary Simpson


    Gary,

    That’s a good point that I hadn’t thought of. Something else which I need to deal with is this: Copy the following and put your API key code where it’s shown below:

    http://dev.virtualearth.net/REST/v1/Locations/617%20Norris%20Avenue?o=xml&key=YOUR_API_KEY_HERE

    The results that you’ll see are more than one location. It’s entirely possible that in some of your experiments it was returning more than one but I hadn’t thought of it – so the one it’s showing you in the program is the last one.

    I need to look to see if there’s more than one and, if so, show a list and let them select it.

    Something else that I was thinking of is this: How do we know it’s the right place? If it’s not then that screws up everything from that point forward because obviously the calculation of the route won’t be correct.

    This is what I’d like to do: Give them a way to actually open the Bing map (either in their own browser or in a separate form in the program that has a web browser) and go LOOK to see and then verify by the click of a button that “yes this is the place I mean”.

    What do you think?


    Please call me Frank :)

    Friday, December 21, 2012 2:15 PM
  • Frank

    How about a database that holds all confirmed searches in bing.

    and the database can be filled by admin only, with there own typed Address/route. I know there wont be a longditude or latitude, But can the search for the Address from the database be on DestinationFrom And DestinationTo, and if it has latitude/longditude the show in the result when typing in the addresses.

    on the booking form can one have a button to say search database or search bing.

    I have had a look and there are a few Norris ave..... lol

    that is another good Idea of yours


    Gary Simpson

    Friday, December 21, 2012 6:57 PM
  • Gary,

    To clarify a few things here:

    “How about a database that holds all confirmed searches in bing.”

    That’s already there; that’s how it’s set up now. It’s not saving anything once you close the program but that’s only because it’s a test right now.

    “and the database can be filled by admin only”

    That part is up to you. Presently there is no user level; that’ll be added at the end of everything (so we can test it).

    “I know there wont be a longditude or latitude…”

    There will be if I use Bing so I’m missing how that’s the case? If there is no latitude/longitude then obviously it could be done in the next part (routes) but if we have this in “locations” then it’s been verified to be correct and the routing is faster because the lat/lon pair is known in advance.

    There’s a disconnect, apparently, between how you’re envisioning it and how I am. Do you want me to proceed with mine so that you can see what I mean?


    Please call me Frank :)

    Friday, December 21, 2012 7:38 PM
  • Frank

    yes please carry on with what you're doing. i am just throwing sugesstions at you,

    Frank I know it's a bit of an ask But when the user insert an address like 29 Mill hill could it made that the second and or third word starts with capitals like Mill Hill,, And like Bury St Edmunds instead of bury st edmunds as the user types


    Gary Simpson

    Friday, December 21, 2012 7:50 PM
  • Frank

    yes please carry on with what you're doing. i am just throwing sugesstions at you,

    Frank I know it's a bit of an ask But when the user insert an address like 29 Mill hill could it made that the second and or third word starts with capitals like Mill Hill,, And like Bury St Edmunds instead of bury st edmunds as the user types


    Gary Simpson

    Sure,

    What you're talking about is Proper Case. That's pretty easy to include but let me suggest this: Let's have a single button they click to let it change everything rather than doing it automatically. The reason I say that is because it would change:

    IBM main office

    to:

    Ibm Main Office

    So let them click the button to do most of the correction, but then they can go back and modify "Ibm" back to "IBM".

    Agree?


    Please call me Frank :)

    Friday, December 21, 2012 8:10 PM
  • Agree

    Gary Simpson

    Friday, December 21, 2012 8:48 PM
  • Agree

    Gary Simpson

    Ok - I've got a general idea of where to go and it'll take a while so I'll start "version 2" tomorrow. :)


    Please call me Frank :)

    Friday, December 21, 2012 8:52 PM
  • Gary,

    This isn't very far along because I had so much to UNdo first - but I would like for you to give this a go so that I can show you the concept that I have in mind:

    http://www.fls-online.com/VBNet_Forum/12-22-12/Taxi.zip

    It's only to the point of returning the information from Bing. Nothing beyond that is hooked up yet.

    As one of your experiments, please enter ONLY the following information in Address1 (and nothing in the other fields):

    100 Elm Street

    Tell me what you think of this new model please?


    Please call me Frank :)


    Saturday, December 22, 2012 5:44 PM
  • Frank

    Thats Look's Brilliant and a nice way to view the location as well and the correction button works nice.

    Frank how you have done this God only knows well done Frank I like it

    Best Regards

    Gary


    Gary Simpson

    Saturday, December 22, 2012 6:56 PM
  • Frank

    Thats Look's Brilliant and a nice way to view the location as well and the correction button works nice.

    Frank how you have done this God only knows well done Frank I like it

    Best Regards

    Gary


    Gary Simpson


    Ok good. I'll keep going from that point onward then. I wanted to make sure you were ok with that. In my mind, it's imperative that the user (admin or otherwise) verify that it's the right place.

    Of course there will be some addresses entered where they don't know if it is or not, but at least doing it this way gives them the impetus to try to get the data they need. Once it has the location then generating distance and travel information (maybe even maps?) is made much easier.


    Please call me Frank :)

    Saturday, December 22, 2012 7:04 PM
  • Gary,

    How about give this latest one a run:

    http://www.fls-online.com/VBNet_Forum/12-23-12/Taxi.zip

    It does now save the data in locations. Once you see if it all works like you want, I have a question about something that might need to be changed.

    Let me know please?


    Please call me Frank :)

    Sunday, December 23, 2012 4:32 PM
  • Frank

    Wow Sir you have impressed me so much I cant belive you have done this in such a short period of time "Frank It's Great"

    Can you have it so only full capitals are on in the postcode textbox please.

    well done Frank

    Best Regards 

    Gary


    Gary Simpson

    Sunday, December 23, 2012 5:07 PM
  • Can you have it so only full capitals are on in the postcode textbox please.

    Ok, try this one then:

    http://www.fls-online.com/VBNet_Forum/12-23-12/Taxi.zip


    Please call me Frank :)

    Sunday, December 23, 2012 5:16 PM
  • Frank

    is there a difference to this one. as I have tried the second one. But if I close the Programe and then re-open it. the addresses  I have inserted are not there or have you got that far yet. 


    Gary Simpson

    Sunday, December 23, 2012 5:30 PM
  • Frank

    is there a difference to this one. as I have tried the second one. But if I close the Programe and then re-open it. the addresses  I have inserted are not there or have you got that far yet. 


    Gary Simpson

    I just tried it and yes - it's working here.

    You might want to take that link that I posted above and save it to your desktop (so that it's not a protected folder and to ensure that you're not using an older version of it) and try that?


    Please call me Frank :)

    Sunday, December 23, 2012 5:35 PM
  • frank It works!!!!

    Gary Simpson

    Sunday, December 23, 2012 6:01 PM
  • frank It works!!!!

    Gary Simpson

    Good! :)

    How about try to break it. I'm serious, give it a good full work out and think of yourself as being the user as you know the business well and I don't.

    Tell me what doesn't work or if it fails, it has has exception handling in it - so I guess you'll see how that works too. ;-)

    Add a bunch, delete them, add some back, modify - check every button that it's working like it's supposed to and all of that.


    Please call me Frank :)

    Sunday, December 23, 2012 6:05 PM
  • Frank

    I think I broke it. I have downloaded the link to my desktop. From there I have run the programe. I had inserted about 10 addresses and tried to modify them with no success if I view all addresses I can see them all but still cant modify the addresses.

    the I closed the programe and re-opened the programe, But guess what no addresses where in there again

    I must be doing something wrong i have deleted all from my desktop to do with this programe except bing key

    and tried it all again still no success. any suggestions Frank


    Gary Simpson

    Sunday, December 23, 2012 9:08 PM
  • Frank

    I think I broke it. I have downloaded the link to my desktop. From there I have run the programe. I had inserted about 10 addresses and tried to modify them with no success if I view all addresses I can see them all but still cant modify the addresses.

    the I closed the programe and re-opened the programe, But guess what no addresses where in there again

    I must be doing something wrong i have deleted all from my desktop to do with this programe except bing key

    and tried it all again still no success. any suggestions Frank


    Gary Simpson

    Well I'm not sure that I understand what you mean.

    I did this: I added an address in and viewed in the DGV:

    I then clicked on "Edit This Location" and it shows this:

    Is that what you see or not?


    Please call me Frank :)

    Sunday, December 23, 2012 9:14 PM
  • correct...

    and I managed to get the message:


    Gary Simpson

    Sunday, December 23, 2012 9:28 PM
  • Last part first - that's indicating that it can't find the .sdf file. That's odd - there's nothing in the program that can delete it and it's not an absolute path. What's more if it would never have worked so something weird happened. I'm not sure about that - you might want to delete the folder from your desktop and download it again.

    As for the first part - if you read that note that I show in that modify form, I don't have the address information there. In my mind, if they modify any part of the physical address then it needs to be verified through Bing again. I suggest if that's the case that they delete it and add a new one.

    I *can* put the physical address part in there, but -- you tell me. Don't you think that'd be dangerous to do if the physical address changed?

    When I get to other parts of the program, like the routes next, I'll have it so that if they delete a location then it'll look to see how that cascades into other parts (like the routes) that use that information.

    First things first though, look in the folder you put on your desktop and you should see in the \bin\debug folder this file:

    gt.sdf

    If you're curious that's "Gary Taxi". ;-)

    If that file isn't there, then something really odd has happened. Delete the folder and let's start again.


    Please call me Frank :)

    Sunday, December 23, 2012 9:37 PM
  • Hold up ... there IS something wrong and I don't yet know what.

    If I can't figure it out, I'll do it all over again dang it. This may be tomorrow getting back to you, but delete your folder entirely - something is screwy.


    Please call me Frank :)

    Sunday, December 23, 2012 10:10 PM
  • Frank

    1) I must be doing something wrong. I have downloaded the link you supplied to my desktop

    2) I unziped the file onto my desktop again

    API Key And unzipped taxi file

    I Doubled clicked on the taxi file

    I then click the folder taxi to drill down

    I then double clicked on Taxi Folder

    I then clicked on the bin File, Then the Debug File

    Now I clicked on Taxi Application programe starts


    Gary Simpson

    Sunday, December 23, 2012 10:38 PM

  • Gary Simpson

    Sunday, December 23, 2012 10:40 PM
  • Delete the folder you downloaded earlier. There's a problem and I sense that it stems from the fact that a few weeks ago I lost my hard drive, and with it, everything, so I had reinstall everything. I think I may have some default settings for build set up wrong.

    I'll most likely make a new program from scratch so that'll be tomorrow, but that one is flawed. Toss it out please.


    Please call me Frank :)

    Sunday, December 23, 2012 10:43 PM
  • Let's try this whole thing all over again!

    Try this one instead and let me know how it works for you:

    http://www.fls-online.com/VBNet_Forum/12-23-12/Taxi_Program.zip

    Note that I haven't modified the behavior of the "Edit Location". Let me know what you want to do with that.


    Please call me Frank :)

    Sunday, December 23, 2012 11:06 PM
  • Frank it works ok now thank you

    Gary Simpson

    Sunday, December 23, 2012 11:56 PM
  • no leave as is but would it be possible to take out the Street Address2 Textbox, I dont think that is needed

    Unless that street AddressTextbox2 is for the destinationTo sorry frank


    Gary Simpson

    Monday, December 24, 2012 12:04 AM
  • no leave as is but would it be possible to take out the Street Address2 Textbox, I dont think that is needed

    Unless that street AddressTextbox2 is for the destinationTo sorry frank


    Gary Simpson

    No - this is only a location. In and of itself, it has nothing to do with a route or a fare - it's just "a place" as designated by the Bing Formatted address, the latitude, and the longitude. This is the part that concerns me if they can't get the Bing data and I need to work through that yet.

    By my estimation, it's after eleven PM your time so we can move forward tomorrow, but I'd like for you to do this: Go up to the top of this thread (yea, waaaaaay up there) and mark the first few people as the answerer, then start a new thread (make it a discussion). Call it "Continuation Of Taxi Program" or whatever else you want, but this one is so long that it's getting to be difficult to navigate in.

    Then post a link here (so I'll get the e-mail) to that new thread and we'll pick up on it there. This one is unwieldy.


    Please call me Frank :)

    Monday, December 24, 2012 12:09 AM