Access03 codes issue in Vista

  • Thread starter Thread starter ChoonBoy
  • Start date Start date
C

ChoonBoy

1) The code below run in XP but not in Vista. An error message will pop up
and the program closes.

Me.LinkTo1.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink

2) There is also too much security control. The code below will freeze
Access and a force closing is necessary.
Application.FollowHyperlink "C:\program files\hoesales\hoesingapore.mde"


Appreciate any help it the above codes.

Thanks
 
hi,
1) The code below run in XP but not in Vista. An error message will pop up
and the program closes.
Me.LinkTo1.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
Never used this, what does it?

You can create your own hyperlinks, cause they are strings:

Me![HyperlinkField] = "link desciption#link#"

2) There is also too much security control. The code below will freeze
Access and a force closing is necessary.
Application.FollowHyperlink "C:\program files\hoesales\hoesingapore.mde"
Read this document carfully:

http://www.microsoft.com/downloads/...7C-4068-48B8-9503-E160A6693BBA&displaylang=en

The basic problem you are facing is the fact, that users don't have
write/change permissions in \Program Files\ and beneath. These are
needed to create the .ldb file.

I'm normally trying to place my applications in %ALLUSERSPROFILE%, there
all users have the write/change permission on the directories.


mfG
--> stefan <--
 
Hi Stefan,

Thanks for suggestion and the link. I continue to have these issues whether
the files are placed in Program files or Desktop or My documents. The reason
why I put in Program is because I cannot download my package (msi) with
runtime included to anywhere except into Program (no idea why?).

My code for :
Me.LinkTo1.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink

Is attached to a button. Once clicked the Insert hyperlink box will initiate
to allow a user to select file from any location and place the link to the
field LinkTo1.

Unfortunately it does not work in Vista Starter and Vista Home except for
Vista Business and all XPs.

I want this function and hopefully someone can give me an alternative codes
that will sure fire.

Thanks



Stefan Hoffmann said:
hi,
1) The code below run in XP but not in Vista. An error message will pop up
and the program closes.
Me.LinkTo1.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
Never used this, what does it?

You can create your own hyperlinks, cause they are strings:

Me![HyperlinkField] = "link desciption#link#"

2) There is also too much security control. The code below will freeze
Access and a force closing is necessary.
Application.FollowHyperlink "C:\program files\hoesales\hoesingapore.mde"
Read this document carfully:

http://www.microsoft.com/downloads/...7C-4068-48B8-9503-E160A6693BBA&displaylang=en

The basic problem you are facing is the fact, that users don't have
write/change permissions in \Program Files\ and beneath. These are
needed to create the .ldb file.

I'm normally trying to place my applications in %ALLUSERSPROFILE%, there
all users have the write/change permission on the directories.


mfG
--> stefan <--
 
hi,
Thanks for suggestion and the link. I continue to have these issues whether
the files are placed in Program files or Desktop or My documents. The reason
why I put in Program is because I cannot download my package (msi) with
runtime included to anywhere except into Program (no idea why?). Okay.

My code for :
Me.LinkTo1.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink

Is attached to a button. Once clicked the Insert hyperlink box will initiate
to allow a user to select file from any location and place the link to the
field LinkTo1.
It works for me, but I'm using Ultimate... your field assigned to
LinkTo1 is of type Hyperlink?
Unfortunately it does not work in Vista Starter and Vista Home except for
Vista Business and all XPs.
I will check this..


mfG
--> stefan <--
 
You can drop the extra security by using Trusted Locations. Check the help
files on "Trusted Locations" for instructions.
 
Thanks,

I know how to set trusted location from Access 2007.

Appreciate guidance to set up in PCs with only Access 2003 Runtime on Vista
or XP
 
Thanks for giving it a try to see the problem I am facing.

Yes the field LinkTo1 is of hyperlink type. In the 2 Vista editions that
does not work, the button can only bring out the Insert hyperlink box. When
you click on any of the listed files (in fact on any part of the box) the
program will freeze and a dialog box will appear saying it will check the
problem with MS and closes Access.

As long as I do not have the above solved, I have to be very selective on
which PC to install and this is not right.
 
ChoonBoy said:
Thanks,

I know how to set trusted location from Access 2007.

Appreciate guidance to set up in PCs with only Access 2003 Runtime on
Vista
or XP

I know that you can manually turn off macro security and sandboxing in
Vista:

Tools >>> Macro >>> Security

set to low, then answer yes to allow code. But I'm not sure if it can be
done through the registry. I cannot test it either because I've disabled
most of Vista security since I rarely go on the Internet with 1 machine, and
never go on with the other. Here's some VBScript that can do it in Windows
XP, and out to work with proper permissions in Vista:

Const cDatabaseToOpen = "<path to mdb/mde>"
On Error Resume Next
Dim AcApp
Set AcApp = CreateObject("Access.Application")
AcApp.AutomationSecurity = 1 ' msoAutomationSecurityLow
AcApp.Visible = True
AcApp.OpenCurrentDatabase cDatabaseToOpen
If AcApp.CurrentProject.FullName <> "" Then
AcApp.UserControl = True
Else
AcApp.Quit
MsgBox "Failed to open '" & cDatabaseToOpen & "'."
End If
 
Thanks Arvin,

The set-off security when opening an access file will come in very handy, I
have already have some thing in mind for it. Have tested it with a button on
XP but no opportunity on Vista yet.

By the way where do I place the code for it to work when some one select
from Start/program/XX.mde.

On my original issue

Me.LinkTo1.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink

It still does not work as I think it is not a security issue but something
else.

Thanks
 
Hi Arvin,

I tried the codes provided by you on shutting off the security for both
Vista and XP

I works very well for XP and Vista Business but not for Vista Starter and
Home. The message "object or class does not support the set of events".

I am getting very dissapointed with Vista no wonder a number of my friends
are reverting back to XP.





Regards

AY
 
Back
Top