Share via

Adding command button to form that follows URL with variable string, based on text in a combo box

Anonymous
2016-03-31T15:04:04+00:00

I have a form which I use search and view records in an Access database. The database contains authors and their works, which I am displaying via a split form with a searchable combo box on the author field.

I want to add a command button to open a URL in my browser, taking the name of the author from the combobox and appending it within the given URL.

I have tried to do this by editing the hyperlink address property of the command button, using the hyperlink builder as described here 

The hyperlink template looks like this:

="http://www.oxforddnb.com/search/quick?quicksearch=quicksearch&docPos=1&searchTarget=people&simpleName=" & [Combo13] & "&search=GO"

When I then click the command button, I get 

"A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control"

I then receive a security notice, asking me whether I wish to continue, before Access finally throws an error saying it is unable to open the specified file.

I may simply be approaching the problem from the wrong direction, but I have been unable to find guidance on these forums and elsewhere. 

Any help would be greatly appreciated. Many thanks!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2016-03-31T15:48:45+00:00

    Thanks for the reply.

    I'd like it to open in my internet browser as a standalone program.

    I'm a bit of a beginner here. Could you provide some more detailed instructions on how to achieve this?

    Where do I put Application.FollowHyperlink strURL? 

    Thanks again,

    Jamie

    Was this answer helpful?

    0 comments No comments
  2. DBG 11,711 Reputation points Volunteer Moderator
    2016-03-31T15:36:36+00:00

    Hi. When you said you want to open a URL in "your browser," are you referring to using a browser control on your form or did you want your machine's internet browser to open as a standalone program? If the latter, then try using the FollowHyperlink method. For example:

    Application.FollowHyperlink strURL

    Hope that helps...

    Was this answer helpful?

    0 comments No comments