private void btn_submit_Click(object sender, EventArgs e) { unit = txt_unit.Text; street = txt_street.Text; streetNumber = txt_stNumber.Text; suburb = txt_suburb.Text; state = txt_state.Text; postcode = txt_postcode.Text; string addressQuery = unit + " " + streetNumber + " " + street + ", " + suburb + ", " + state + ", " + postcode; Location newLocation = Geocoder.GeoCode(addressQuery); if (newLocation == null) { MessageBox.Show("Could not locate address."); } else { MessageBox.Show("Address location found."); addressLocation = newLocation; this.Hide(); } }