Help in opening files in Access VB

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the .HyperlinkAddress = Address ; .Hyperlink.Follow method to open
files in Access VB as part of a File management Database. This method works
and open all files with registered associations in Windows XP, but my problem
is that some files open twice. And I can not seam to get around this
problem. Is there a better way to open files from Access VB? Help is
appreciated in advance.
 
Thanks for the tip Barry... almost works, and I am sure I am close. Here is
what I know:

First: I copied the code into a blank module and then used the string
"Print fHandleFile(address, WIN_NORMAL)" to call the function. (I have never
seen the "Print" used like this).

Second: When running the code, the function is called and runs correctly,
opening the file as expected. Upon returning to the calling procedure, the
following error pops up: "Object doesn't Support the property ro Method".
Any ideas?

Thanks for the help.
 
I'm not sure why you're using Print, but it won't call a function like that.
If you want to call the fHandleFile function from your code, just use:
fHandleFile address, WIN_NORMAL

If you want to handle the return value in your code, use:

strMyReturnValue = fHandleFile(address, WIN_NORMAL)

Barry
 
That worked... Thanks very much.

As to why I used the "Print" command... that is how Access interpreted my
cut/paste from the link. "?fHandleFile("C:\TEMP\",WIN_NORMAL)" The "?"
turned into "Print" and I am not smart enough to figgure that out. But you
are and that is all that counts. Thanks again.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top