A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

MS Access file



 
 
Thread Tools Display Modes
  #1  
Old January 11th, 2010, 04:33 PM posted to microsoft.public.access.tablesdbdesign
Zilla
external usenet poster
 
Posts: 16
Default MS Access file

I have a file at work that the boss uses and now has given to me. Only
problem is the person who designed the access file to run from the
bosses desk top. When I try and run the file from mine it comes up
with an error shown below. I would like to know how I can change the
code so that I can run the file as well. This file is in a general
folder not locked. This is driving us both nuts can anyone help?

Thanks


Private Sub Form_Start() ----------------- This part
is highlighted yellow.
Set db = CurrentDb
DoCmd.SetWarnings False
DoCmd.Maximize
Call Delete_Queries("*")
Call Delete_Tables("Temp*")
Me.Database_Name = DBName
strUser = UCase(GetUser)
Me.User = strUser
End Sub
  #2  
Old January 11th, 2010, 05:15 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default MS Access file

On Mon, 11 Jan 2010 07:33:37 -0800 (PST), Zilla wrote:

I have a file at work that the boss uses and now has given to me. Only
problem is the person who designed the access file to run from the
bosses desk top. When I try and run the file from mine it comes up
with an error shown below. I would like to know how I can change the
code so that I can run the file as well. This file is in a general
folder not locked. This is driving us both nuts can anyone help?

Thanks


Private Sub Form_Start() ----------------- This part
is highlighted yellow.
Set db = CurrentDb
DoCmd.SetWarnings False
DoCmd.Maximize
Call Delete_Queries("*")
Call Delete_Tables("Temp*")
Me.Database_Name = DBName
strUser = UCase(GetUser)
Me.User = strUser
End Sub


Is this in Access 2007? If so, the database must be in a "Trusted Location" in
order for VBA code such as this to be allowed. It would appear that the
developer specified the boss's folder as trusted, but yours isn't.

Check the Access help for "Trust Center".
--

John W. Vinson [MVP]
  #3  
Old January 11th, 2010, 06:49 PM posted to microsoft.public.access.tablesdbdesign
Zilla
external usenet poster
 
Posts: 16
Default MS Access file

On Jan 11, 8:15*am, John W. Vinson
wrote:
On Mon, 11 Jan 2010 07:33:37 -0800 (PST), Zilla wrote:
I have a file at work that the boss uses and now has given to me. Only
problem is the person who designed the access file to run from the
bosses desk top. When I try and run the file from mine it comes up
with an error shown below. I would like to know how I can change the
code so that I can run the file as well. This file is in a general
folder not locked. This is driving us both nuts can anyone help?


Thanks


Private Sub Form_Start() * * * * * * * *----------------- This part
is highlighted yellow.
* *Set db = CurrentDb
* *DoCmd.SetWarnings False
* *DoCmd.Maximize
* *Call Delete_Queries("*")
* *Call Delete_Tables("Temp*")
* *Me.Database_Name = DBName
* *strUser = UCase(GetUser)
* *Me.User = strUser
End Sub


Is this in Access 2007? If so, the database must be in a "Trusted Location" in
order for VBA code such as this to be allowed. It would appear that the
developer specified the boss's folder as trusted, but yours isn't.

Check the Access help for "Trust Center".
--

* * * * * * *John W. Vinson [MVP]


Sorry this is Access 2003. The Access database is in a folder anyone
can access. Once open and you click on a button it creates a report
and sends it to a specified folder that was locked. I managed to
change the path of the report to a new unlocked folder. The boss ran
the report and it placed the report in the new folder with no
problems. But when I try and open the access file to run the report I
receive the error I listed above.

So in the code the developer specified that the bosses desktop where
the shortcut sits as "Trusted Location"? Not sure just a thought I
had.
Any help is appreciated.
  #4  
Old January 11th, 2010, 08:53 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default MS Access file

On Mon, 11 Jan 2010 09:49:59 -0800 (PST), Zilla wrote:

Sorry this is Access 2003. The Access database is in a folder anyone
can access. Once open and you click on a button it creates a report
and sends it to a specified folder that was locked. I managed to
change the path of the report to a new unlocked folder. The boss ran
the report and it placed the report in the new folder with no
problems. But when I try and open the access file to run the report I
receive the error I listed above.

So in the code the developer specified that the bosses desktop where
the shortcut sits as "Trusted Location"? Not sure just a thought I
had.
Any help is appreciated.


Trusted Locations is a new feature in 2007, so THAT'S not the issue.

It may be that you have some missing references. Try opening the database
(holding down the Shift key if you need to bypass startup code or forms), and
type Ctrl-G to open the VBA edtior. Select Debug... Compile myproject. Do
you get any compile errors? If so, select Tools... References. Are any marked
MISSING? If so, which - post the reference name.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.