Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Web Link (A2000 SR1)

    Don't know if this can be done but here go's.

    In my db I have a button which takes me to an internet site dependant on an invisible text:
    Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE " & Me.txtweb, vbNormalFocus

    The text, [txtweb] is set as a default value so when a new record is created, the address is always the same:
    "uk.multimap.com"

    This works fine and opens the web page as it should.

    I want to go a little further with this.
    The following code does the same thing but searches for the post code I require:
    'Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://uk.multimap.com/map/browse.cgi?clie...ksearch=st8+7q"

    Now what I need to do maybe a little complicated (for me anyway).
    On my form is a combo containing a list of postcodes " CollPostCode.Column(0) "

    Is it possible to insert my post code from the combo into the

    'Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://uk.multimap.com/map/browse.cgi?clie...ksearch=st8+7q"
    code ??

    Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://uk.multimap.com/map/browse.cgi?clie....y=9&addr3=&pc=[b]CollPostCode.column(0)[b]&quicksearch=st8+7q"

    As I said earlier, is this possible.

    Dave

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Web Link (A2000 SR1)

    Hi Dave,

    Yes, it is possible, but you must use concatenation of strings to compose the correct web address.

    Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://uk.multimap.com/map/browse.cgi?" & _
    "client=public&db=pc&addr1=&client=public&Submit.x =13&addr2=&advanced=&Submit.y=9&addr3=&pc=" & _
    CollPostCode.column(0) & "&quicksearch=st8+7q"

    But why not use a hyperlink instead of a Shell command? That way, you don't need to know what the path to the browser is:

    Application.FollowHyperlink "http://uk.multimap.com/map/browse.cgi?" & _
    "client=public&db=pc&addr1=&client=public&Submit.x =13&addr2=&advanced=&Submit.y=9&addr3=&pc=" & _
    CollPostCode.Column(0) & "&quicksearch=st8+7q"

    Note: the underscores at the end of the lines are VBA continuation characters. There must be a space before them, otherwise you get a syntax error.

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Web Link (A2000 SR1)

    Hello Hans
    Good vacation I hope and it's nice to see you back.
    AnyWay.

    The code I attached isn't quite correct , let me explain.

    'Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://uk.multimap.com/map/browse.cgi?clie...ksearch=st8+7q"

    Notice the post code in the above. is listed twice "ST87QE" and once again at the end of the statement "st8+7q"
    I think its the end "st8+7q" which does the search bit.
    How would I make this code pick up whatever is in the combo.
    If this can be done, I think it will be sufficient enough.

    Regards
    Dave

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Web Link (A2000 SR1)

    Hi Dave,

    I had a very good vacation, thank you.

    I did a quick test on uk.multimap.com and I think that the web address will work if you enter the full post code for both pc= and quicksearch=, and even if you omit quicksearch= entirely.

    So you can try

    Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://uk.multimap.com/map/browse.cgi?" & _
    "client=public&db=pc&addr1=&client=public&Submit.x =13&addr2=&advanced=&Submit.y=9&addr3=&pc=" & _
    CollPostCode.Column(0) & "&quicksearch=" & CollPostCode.Column(0)

    or

    Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://uk.multimap.com/map/browse.cgi?" & _
    "client=public&db=pc&addr1=&client=public&Submit.x =13&addr2=&advanced=&Submit.y=9&addr3=&pc=" & _
    CollPostCode.Column(0)

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Web Link (A2000 SR1)

    Hans
    Absolutely Fabulous

    Thanks

    Dave

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Web Link (A2000 SR1)

    You're not comparing me to Edina and/or Patsy, I hope?

  7. #7
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Web Link (A2000 SR1)

    I did actually think about it after I'd replied and had a little snigger to myself.
    No pun intended.

    Have a good day

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •