Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Strange Startup Problem

 
   Database Forums (Home) -> MS Access RSS
Next:  Remove Enter Parameter Value dialogue boxes from ..  
Author Message
John von Colditz

External


Since: Dec 30, 2008
Posts: 4



(Msg. 1) Posted: Tue Dec 30, 2008 1:17 pm
Post subject: Strange Startup Problem
Archived from groups: comp>databases>ms-access (more info?)

I maintain a multi-user Access 2003 front-end connected to a SQL Server
2000 back end. When the front-end is opened, the Autoexec macro runs a
single function, StartSystem(), which starts the system. On two user's
systems, on the same day, the Macro threw an error that it could not
find the StartSystem() function, and halted. No other systems had the
error. In each of their databases I went opened the module where
StartSystem() is located. Typed ?StartSystem() in the immediate window,
and the database started correctly. I closed the database, reopened it
and all was well.

Does anyone have a clue what is going on?

Thanks!

John

 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
lyle fairfield

External


Since: May 11, 2008
Posts: 296



(Msg. 2) Posted: Tue Dec 30, 2008 2:36 pm
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 30, 3:17 pm, John von Colditz wrote:
> I maintain a multi-user Access 2003 front-end connected to a SQL Server
> 2000 back end. When the front-end is opened, the Autoexec macro runs a
> single function, StartSystem(), which starts the system. On two user's
> systems, on the same day, the Macro threw an error that it could not
> find the StartSystem() function, and halted. No other systems had the
> error. In each of their databases I went opened the module where
> StartSystem() is located. Typed ?StartSystem() in the immediate window,
> and the database started correctly. I closed the database, reopened it
> and all was well.

It's not so unusual in my experience for Access/VBA to be unable to
find Public Functions. A few years ago Terry Kreft suggested

cbc.OnAction = "=GetComments(1)"

I have followed this suggestion and have had no "can't find the
function" errors since.

 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
Rich P

External


Since: Jul 08, 2005
Posts: 44



(Msg. 3) Posted: Tue Dec 30, 2008 5:26 pm
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Does the function have an error trap?

Public Function xyz()
On Error GoTo errLbl
...
Exit Function
errLbl:
Msgbox Err.Description
End Function

Probably some condition has not been met on initial startup.
Err.Description may shed some light on the problem.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
John von Colditz

External


Since: Dec 30, 2008
Posts: 4



(Msg. 4) Posted: Tue Dec 30, 2008 5:26 pm
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rich P explained :
> Does the function have an error trap?
>
> Public Function xyz()
> On Error GoTo errLbl
> ..
> Exit Function
> errLbl:
> Msgbox Err.Description
> End Function
>
> Probably some condition has not been met on initial startup.
> Err.Description may shed some light on the problem.
>
> Rich
>
> *** Sent via Developersdex http://www.developersdex.com ***

Yes. I trap and log all errors. The error is actually coming from the
macro, saying it can't find StartSystem()...

John
 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
Roger

External


Since: Feb 04, 2008
Posts: 32



(Msg. 5) Posted: Tue Dec 30, 2008 5:26 pm
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 30, 2:39 pm, John von Colditz wrote:
> Rich P explained :
>
>
>
>
>
> > Does the function have an error trap?
>
> > Public Function xyz()
> > On Error GoTo errLbl
> > ..
> > Exit Function
> > errLbl:
> > Msgbox Err.Description
> > End Function
>
> > Probably some condition has not been met on initial startup.
> > Err.Description may shed some light on the problem.
>
> > Rich
>
> > *** Sent via Developersdexhttp://www.developersdex.com***
>
> Yes. I trap and log all errors. The error is actually coming from the
> macro, saying it can't find StartSystem()...
>
> John- Hide quoted text -
>
> - Show quoted text -

so the module exists and runs from the intermediate window
but the macro doesn't 'run' ?
 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
John von Colditz

External


Since: Dec 30, 2008
Posts: 4



(Msg. 6) Posted: Tue Dec 30, 2008 5:26 pm
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Roger expressed precisely :
> On Dec 30, 2:39 pm, John von Colditz wrote:
>> Rich P explained :
>>
>>
>>
>>
>>
>>> Does the function have an error trap?
>>> Public Function xyz()
>>> On Error GoTo errLbl
>>> ..
>>> Exit Function
>>> errLbl:
>>> Msgbox Err.Description
>>> End Function
>>
>>> Probably some condition has not been met on initial startup.
>>> Err.Description may shed some light on the problem.
>>> Rich
>>
>>> *** Sent via Developersdexhttp://www.developersdex.com***
>>
>> Yes. I trap and log all errors. The error is actually coming from the
>> macro, saying it can't find StartSystem()...
>>
>> John- Hide quoted text -
>>
>> - Show quoted text -
>
> so the module exists and runs from the intermediate window
> but the macro doesn't 'run' ?

Correct. The macro tries to run, and says it can't find the code. Once
I run it from the immediate window, it will start from the macro.

John
 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
Rich P

External


Since: Jul 08, 2005
Posts: 44



(Msg. 7) Posted: Tue Dec 30, 2008 6:26 pm
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

For the Macro Action I selected the

RunCode

action and then in the Function Name window below I selected the desired
function from the builder dialog that comes up when you click on the
elipse (...) button. This seems to work for me.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
John von Colditz

External


Since: Dec 30, 2008
Posts: 4



(Msg. 8) Posted: Tue Dec 30, 2008 6:26 pm
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rich P explained :
> For the Macro Action I selected the
>
> RunCode
>
> action and then in the Function Name window below I selected the desired
> function from the builder dialog that comes up when you click on the
> elipse (...) button. This seems to work for me.
>
> Rich
>
> *** Sent via Developersdex http://www.developersdex.com ***

Yes, that's the bizarre part. It's been working fine for at least 5
years...

John
 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
Rich P

External


Since: Jul 08, 2005
Posts: 44



(Msg. 9) Posted: Wed Dec 31, 2008 11:25 am
Post subject: Re: Strange Startup Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Well, one other option you have is to use a startup form instead of the
autoexec macro. Create a startup form and select that for the startup
option (either deleting or renaming your autoexec macro so that it does
not execute). In the startup form you can use VBA in the Form's Load
event with an Error Trap to Resume Next but log any errors that may
occur:

-----------------------------------------
Private frmStartup_Load()
On Error GoTo errLbl
...
call your function or just run whatever in this event
Exit
errLbl:
DoCmd.RunSql "Insert Into tbl_ErrLogs(ErrDescrp, ErrDate)
Select '" & Err.Description & "', #" & Date & "#"
Resume Next
End Sub
-----------------------------------------



Rich

*** Sent via Developersdex http://www.developersdex.com ***
 >> Stay informed about: Strange Startup Problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Startup and forms caption - In the caption of a form I have whatever it is in the caption field naming the form ie: Legend, search. edit info etc I have different databases for different areas so I want it to pull additional info into the caption. I know how to change the captio...

Startup form question - Hi How can I show the splash screen at the start-up while opening the main form in the background and close splash form once the main form is loaded? Thanks Regards

Access 2007 Startup Restrictions - Does anyone know how to restrict access to all toolbars (including the Home menu). Access 2003 and earlier allowed you to specify the options manually. I have found that you can get a form to open automatically at startup, but I can't hide all..

Load form on Startup in Access 2007 - How do I tell Access to open a specific form on startup in Access 2007? I know in earlier versions it was in the tool bar and/or in the database properties; but in 2007 I can't for the life of me seem to find where I set that... Any help would be..

Disabling part of a form on startup and setting the focus - I borrowed one of the forms from the MS Access Solutions database and altered it to fit my needs. The form was the 'EditProducts' form where you select a category from a combo which then populates another combo for products. Then when you select a..
   Database Forums (Home) -> MS Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]