Hi,

Can anybody tell me how to make a button in an access form that connect me to a website?

Dani AI

Generated

As pointed out, adding a hyperlink to a control is the fastest way and it solved the original question for . For anyone reading later who needs more control, here are practical alternatives, a short VBA example, and common pitfalls that were not covered in the thread.

Three common approaches (short summary):

  • Static hyperlink on the control: quick, no code, good for a fixed URL (see ).
  • VBA: build a URL dynamically or run other logic before opening the site. This is the most flexible option.
  • Embedded view: use the WebBrowser control on a form to display a page inside Access when embedding is required.

Example VBA to open a site (dynamic URL built from a field):

Private Sub cmdOpenSite_Click()
    Dim url As String
    url = "https://www.example.com/?id=" & Nz(Me.ID, "")
    Application.FollowHyperlink url
End Sub

Troubleshooting notes and tips:

  • Always include the protocol (http:// or https://). Missing that can prevent the OS from recognizing the address.
  • If a button seems not to work, check Access trust settings and that macros/VBA are enabled; corporate policies can block external links.
  • If you want the page inside Access, the WebBrowser ActiveX control can be handy but may behave differently across Office versions or 32/64-bit installs; using an external browser via FollowHyperlink avoids those compatibility issues.
  • If the link opens the wrong browser, the system default browser setting in Windows controls that, not Access.

Summary: for simple links the built-in hyperlink works (as demonstrated by ). Use VBA when the URL must be composed or when additional logic is required. The snippet above is a ready pattern for dynamic links.

Recommended Answers

All 2 Replies

1)Make button on form
2)Right click button - choose properties
3)In the properties box choose format
4)Find the box entitled hyperlink address
5)Insert web address

Button will now link to the specified website.

I've made the button with the link as you had written and it works. Thank you verry much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.