Results 1 to 4 of 4
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access the WWW in Access (Access97/SR2)

    (I'm posting in Access because that's where I have the problem; the post might be better off in another forum).


    I have changed a table field definition from Text to Hyperlink, and so the Form based on the Query based on the Table now responds when I click on that field - it fires up Internet Explorer and takes me straight to the web page (after I remember to dial-up).

    Problem is, my default browser is supposed to be Mozilla, or Netscape; anything but IE.


    How can I tell Acess or the powers-that-be to use Mozilla when I click on the link?

    If it involves a registry fix, I can do that manually. My registry is backed up each morning to guard against fools like me .......

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Access the WWW in Access (Access97/SR2)

    Here is how I got Access to open the page in Netscape.

    I changed the field back to a text field, then wrote the following as the onclick event.

    <pre>Private Sub field_Click()
    Dim retval As Double
    Dim strdestination As String
    strdestination = Me!field
    retval = Shell("C:Program FilesNetscapeCommunicatorProgramnetscape.exe " & strdestination)
    End Sub
    </pre>

    Regards
    John



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

    Re: Access the WWW in Access (Access97/SR2)

    I haven't tried it myself, but using ShellExecute should open .htm and .html pages in the application you have associated with those extensions. As in John Hutchison's reply, you should use a text field for this.

    ShellExecute can be used to open or print *any* file in the application associated with its extension. See <post#=191458>post 191458</post#> for an example of how to use it.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access the WWW in Access (Access97/SR2)

    Thank you; this works well.

    But see also my follow-up post asking about a test for an internet connection (dial-up)

Posting Permissions

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