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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide query result

Status
Not open for further replies.

BGuidry

Technical User
Mar 18, 2009
28
US
OK, I got this hyperlink field to open with Adobe Acrobat as below, but I would also like it to hide the query's datasheet view of the hyperlink. I do not know how to set a query's visible property in VBA though.

Code:

Private Sub Command59_Click()
Dim qryLithLogLinks As Hyperlink

DoCmd.OpenQuery ("qryLithLogLinks")
DoCmd.RunCommand acCmdOpenHyperlink

End Sub
 
I'm not sure I'm following.. I have a guess, but not sure.

In your code, you open a query, and then you open a link immediately after. And it looks like you're actually opening the same query twice. Is that the case?

--

"If to err is human, then I must be some kind of human!" -Me
 
It is opening the query once, displaying the hyperlink field only, and then opens the hyperlink with the default application, this particular case being Adobe Acrobat. I would like to know if there is a way to make the query hidden, but open the hyperlink only (or close the datasheet window of the query after opening the hyperlink).
 
How are ya BGuidry . . .

To my knowledge you can't hide a query in view, however what you can do is:
[blue]make a form based on that query and hide the form![/blue] The query name is assigned to the [blue]Record Source[/blue] property of the form.

or

In code, use a recordset and execute the hyperlink.

[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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top