Question 2501 Error on Opening - Sometimes??

matthewnsarah07

Registered User.
Local time
Yesterday, 21:46
Joined
Feb 19, 2008
Messages
192
I'm hoping someone has come across this issue or a similar situation before.

I use a holiday request system in 6 different locations all with their own front end which is as simple as it comes - on opening the database the form frmannualleave opens in data entry mode - thats it

We have Dell Desktops in general and all works fine but we have a few Neoware Thin Clients that run on the network - when people load the database on these the appilcation runs but the form never materialises - eventually giving a 2501 runtime error, which I believe is just a cancelled function.

Any ideas how I can get round this problem?
 
I think this is a thin client issue and not and MS Access problem. I suggest you get with the thin client admin and see if anything can be done...
 
Thanks Ken

Do you or does anyone know if its possible to insert some code that would force the opening of the initial form and stop the 2501 error occuring
 
I would try simply running an autoexec macro which tries to do a simple message box and see if this works. If this works then we can come up with a pc of code to try and trap the error - :)
 
Thanks Ken

When I first launched this database it had a an initial form which came on at startup which just welcome etc. after 10 seconds it would close and the leave form would open.

On the thin client the welcome box opened and disappeared after 10 seconds but the actual holiday form never loads

The welcome form just used a simple timer event and DoCmd OpenForm etc.

I dont' understand why the first form pops up and not the second, I did try removing the welcome form but then nothing appears as per my first post
 
It may be that there was bound data associated with the second form. Sounds like you trap the error. Is there a docmd/open that tries to open the form that errors?
 
it would appear that its the DoCmd OpenForm part that causes the problem as the close form function executes correctly

Also a quick - how do I get a macro to trigger on opening a Dbase
 
In the routine that contains the docmd open you can trap the error with something like the following which is just a slight modification to Access's standard error checking routine:

On error goto err_MyCode()

- Your other code goes here -

Exit_Mycode
Exit Sub

Err_MyCode
If err.number = 2501 then
-Do some code here-
End if
 
My bad:

Code:
On error goto err_MyCode

- Your other code goes here -

Exit_Mycode
Exit Sub

Err_MyCode
If err.number = 2501 then 
-Do some code here-
End if
 

Users who are viewing this thread

Back
Top Bottom