Error with FollowHyperlink (1 Viewer)

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:06
Joined
Aug 30, 2003
Messages
36,118
Okay, so I'm probably having a brain cramp. I have an application (2007 accde) that has been working for some time, this line specifically:

Application.FollowHyperlink Me.txtAttachment

On one users PC (XP Pro SP3), this has worked from day one. His PC got infected to the point that I had to wipe/rebuild it, and suddenly this code throws a warning and then an error. The warning I could live with (it's the MS Office "some files can contain viruses..." warning). However, after clicking on OK for the warning, I get an error that says "Can't print form image to this type of printer". Doesn't make sense, as this user has the same default printer he had before, plus I tried with a different default printer.

Any thoughts on why this is happening? Oh, and if I navigate to the file location on his PC I can open any of the files, so I don't think it's a permissions issue. The code works fine on my PC and a VM with a different OS, and it still works fine for other users.
 

boblarson

Smeghead
Local time
Today, 08:06
Joined
Jan 12, 2001
Messages
32,059
Paul,

Could Sandbox mode be enabled for him? I've found that some people accidentally click on the wrong thing when that initial dialog comes up when a new install of XP SP3 and Access. It's just a remote shot but I thought I'd mention it.

It sounds strange to be getting an error about printing a form image when it appears you are just opening a document.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:06
Joined
Aug 30, 2003
Messages
36,118
Thanks Bob, I don't think so, unless I'm missing something. He has the runtime version of 2007, which I installed the same way I always do (there aren't really any options). I've run all the Windows and Office updates. I made the registry change that sets the trusted location, so no security warning comes up when the app starts. All other code in that app plus code in numerous other apps seems to be running fine.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:06
Joined
Aug 30, 2003
Messages
36,118
PS, here's the error that comes up.
 

Attachments

  • Error.jpg
    Error.jpg
    32.5 KB · Views: 191

boblarson

Smeghead
Local time
Today, 08:06
Joined
Jan 12, 2001
Messages
32,059
Access Runtime errors are sometimes hard to figure out. It may have nothing to do with what it seems like it is. I once had one where I had to put code in to log each step just to see what was happening because I couldn't obviously debug in the traditional sense. I wrote a comment out to a text file for each step just before it occurred and it led me to that there was a required dll that wasn't installed on the machine. I don't know that would be your problem but just thought I'd mention it.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:06
Joined
Aug 30, 2003
Messages
36,118
I appreciate your thoughts Bob. Finally got it sorted, and sadly it was the user who did it. He said "gee, I just remembered that so-and-so had me load some software and it changed what program these files (.tif) opened in".

We changed the file association and that got rid of the error. I didn't consider that, since I could double-click on the file in Windows Explorer and it would open right up. FollowHyperlink uses the default program, so not sure why it would error when opened that way.

Any thoughts on the "potential virus" warning that pops up?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 15:06
Joined
Sep 12, 2006
Messages
15,613
the virus warning may be connected with the path specification.

i have seen similar warnings, but cannot recall exactly what caused/solved tham

maybe files opened directly in C folder. or maybe paths with the wrong slashes in them. ie / instead of \ . vba still seems to understand what you want, but gives you a warning.

i am sure you know what you are looking for as much as anyone here.
 

Users who are viewing this thread

Top Bottom