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

Access 2K Startup Error

Status
Not open for further replies.

Orkis

MIS
Jul 15, 2002
6
US
I have an A2000 db that I want to allow multiple users to
access by placing it on a shared drive. There is an
earlier version of the same db in A 97 that opens fine
using a link:
S:\Special Intererst Folders\UMIS\Admin\UMIS2K.mde

I've narrowed down the problem to the autoexec macro and
the 2000 version will not open using the link unless i
remove the autoexec macro. the only problem is that I
need the autoexec file so that the main form for the db
will open when the db opens.

I have also tried the startup menu but this too did not
work.

When either of these two methods are applied, the file
download box appears, once "Open file from current
location" (it needs to be able to be opened from the
server, not saved on the local drive) is selected, it
downloads the db, then nothing happens.

A ghost version of Access which can only be seen if
(ctrl+alt+dlt) and then "Msaccess" is shown, usually if
Access is open "Microsoft Access" is shown.
I must then shutdown "Msaccess" in order to close out
the .ldb file.

Any help would be greatly appreciated.

Thanks

matt
 
Ok, you've not truly said what your problem is, only the symptoms. How does the Autoexec macro fail? What Error and what is it processing? Why can't you fix the Autoexec macros?

Rename the Autoexec macro so it doesn't fire automatically and set the Startup form if the only thing the macros does is open the form.

I don't like macros anyway because you can't do any error checking. Another way you could do it is to create a function with error checking and then change the Autoexec macro to RunCode.

----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
scking, I dont like macros either, and agree with your assessment. However a couple of qualifiers:

(a) You CAN single step through macros, and in that context can do some error checking (eg. identify the line causing the problem)

(b) It might be useful for the poster to know that holding down the Shift key when the Access program is started prevents the Autoexec from firing, and thus makes starting and debugging cleaner and easier.

Cheers,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
 
The macro is a simple RunCode, code is:
Function autoexec() As Integer

DoCmd.OpenForm "UmisSwitchboard"

End Function

The DB opens fine if I select the file, The only problem with opening the DB is if I use a link through Internet Explorer.

The users need to access the above mentioned form to use the db, they aren't supposed to mess with the tables, etc. Just view forms and reports.
 
Matt,
Unsure of how to fix this problem, but you might try incorporating the entire Access command line into your link; assuming everyone has the same Access image, something like:

C:\Program Files\Microsoft Office\Office\MSAccess.exe S:\Special Intererst Folders\UMIS\Admin\UMIS2K.mde

When you shell to this program from Explorer, check out if there's an option to ensure that its given the focus, and run in a normal/maximised window as opposed to a minimised one.

Sorry this isnt more help,
Cheers,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
 
Caught again with semantics. I really meant to say that you can't trap errors and handle them. Single stepping through a macros is only available to the developer or those who are aware of those capabilities. Anyone logging on to the database will be tripped up by an error in the autoexec macro (unless of course they cheat and hold down the shift key AND the AllowBypass Property, if it has been created, is set to TRUE).

This may be useful. You have named your function 'Autoexec' which might conflict with the name of the 'Autoexec' macro. Have you tried the following?

1) Place a breakpoint on the DoCmd line in the function and then press (F5) while you are in the design window of the function. It SHOULD stop the processing at the line of code. This shows that the basic operation of the function is OK.
2) Press (F8) to take a single step in the code and thereby executing the DoCmd line. This SHOULD open the form if it is named right. If not then focus on the DoCmd line of code.
3) Change the function to the following, rerun it and see if you get an annouced error. Focus then on the error.

Function autoexec() As Integer
On Error GoTo HandleErr

DoCmd.OpenForm "UmisSwitchboard"

Exit_Proc:
Exit Function

HandleErr:
MsgBox "Err:" & Err.Number & vbCrLf & "Description: " & Err.Description
Resume Exit_Proc
Resume
End Function

4) If all the above seem to be functioning correctly then you can focus on the autoexec macro. Double click it. Since there in only one macro line, then you definitely can focus on the macro. If it work then look for something a little less obvious.
5) If the above fail try to use an alternate design. Delete the autoexec macro, and set the 'Startup' property to the 'UmisSwitchboard' form. You wouldn't need the function 'Autoexec' then.

If all this fails PUNT!

----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
Well, It appears to be somewhere around 4th&10, gotta punt.
 
What errors do you get when stepping through the code? I mentioned you should change the name from autoexec and then my sample didn't.
----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
There are no errors showing. The DB downloads after the link is clicked, then access doesn't open. When I bring up the close program box, it shows "Msaccess", but the program is not visible anywhere else except in the close program box (when I am using Access, it is called "Microsoft Access" in the close program box). Then on the server the .ldb file for the DB is open, but I'm not able to use the DB. I've tried opening Access 2000 before clicking the link, but the same thing happens.

As for using the DB, one of my colleagues and I are the only ones who update/change the DB, users use forms (no data entered) to view/print reports.

The users (through contract) could download the db with no problems, but they want to open it from the server with out downloading.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top