Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink working but Access form jumping in front of opened document

Status
Not open for further replies.

Raynepau

Technical User
Dec 30, 2010
33
GB
Can anyone help with the following

I have a hyperlink on a form which is working fine apart from the fact that when I click on it the document opens via the hyperlink but then dissapears behind my access form. I have changed the form modal property to "No" in case this was causing the problem but it is still the same

Any help would be appreciated
 
How are yaRaynepau . . .
Just changing the [blue]Modal[/blue] property may not be enough. If your opening the calling form thru code ... be sure your not opening it model as in the following:
Code:
[blue]Change: DoCmd.OPenForm "FormName", , , , , [purple][b]acDialog[/b][/purple]
To    : DoCmd.OPenForm "FormName"[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks although I'm not sure I understand and I think I may not have explained the problem very well so here goes again

I have a hyperlink on my form which, when clicked, opens a document. So the hyperlink may be

C:\Database\Test.xls

Test.xls opens okay and I can see it but then my access form jumps in front of it

Hope I have explained it okay this time

Thanks
 
Here it is

Private Sub Hyperlink_Click()
If Me.Hyperlink <> "No Document Attached" Then FollowHyperlink Me![Hyperlink], , True


End Sub
 
Raynepau . . .

According to you, your [blue]hyperlink[/blue] button is working fine. Its just that the form appears on top. I don't know how your opening the form that contains the button, but I'm saying, just be sure not to use [purple]acDialog[/purple] in the [blue]DoCmd.OpenForm[/blue] method. This will make the form open [purple]model[/blue] even if the [blue]model[/blue] property is not set in the form.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 

Depending on the hyperlink I could be trying to open a PDF Doc or xls file

It seems to work from another form although there is one key difference

The form in which it does not work is a control called hyperlink

The form on which it does work is a label which is set to the hyperlink control via some code

There is no significant code regarding the form does not work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top