Re: code not running on initial open

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

jimrwest_at_earthlink.net
Date: 02/14/05


Date: 14 Feb 2005 10:25:00 -0800

I am experiencing the same problem intermittently (i.e. several times
per day), but it is not limited only to command buttons...NONE of the
code behind my startup form runs the first time the form is opened,
even the Form_Open code. If I close and re-open the form or exit and
re-launch Access the code runs perfectly, but this is obviously
inconvenient, only solves the problem temporarily, and will not be
possible for my end users to do. I've tried unlinking and relinking
references, compacting and repairing the database, putting debug.print
statements in the code to see if it's actually running (it's not), and
trying an Autoexec macro, but nothing solves the problem. The database
is a MS-Access 2000 database I built from scratch (i.e. it's not
converted from a previous version of Access), using DAO 3.6.
References I'm using are: Visual Basic for Applications, Microsoft
Access 9.0 Object Library, OLE Automation, Microsoft Scripting Runtime,
and Microsoft DAO 3.6 Object Library.

Any suggestions?

Jim

Kelvin wrote:
> Is there some sort of code that Enables the command button. I would
look to
> see if your form has soemthing that is turning this off. There might
be
> code to turn it back on but that isn't getting triggered until you
close the
> form so that it will be enabled the next time. Look through all your
code
> for something likecmdButton.Enabled = False. Or check the initial
Enabled
> property of the button.
>
> Kelvin Lu
>
> "Abbarition" <abbarition@hotmail.com> wrote in message
> news:01cc01c388f5$082feef0$a101280a@phx.gbl...
> > When I open a database, and then open a form, the code
> > connected to my command buttons does not run. It is like
> > there is nothing set for the OnClick event. However, if
> > I close the form and then reopen it, all the code works
> > correctly. I only encounter this problem the first time
> > the form is opened. I am working in Access 2000 and the
> > database MAY have originally been created in Access 97
> > and converted to 2000.
> >
> > Does anyone have any suggestions as to why this is
> > happening?
> > Thanks!



Relevant Pages

  • RE: Event ID 447
    ... Please made a backup for Exchange database first. ... Please run the eseutil /mh command to see if the mailbox store is clean ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • RE: ese error reported
    ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ... <447 indicates that the logical database structure has become corrupted. ... Run the eseutil /p command against the dismounted database file. ...
    (microsoft.public.windows.server.sbs)
  • RE: Event ID 447
    ... database structure of the database. ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ... Please run the following command: ...
    (microsoft.public.windows.server.sbs)
  • RE: Event ID 447
    ... operation terminated with error -327 (JET_errBadPageLink, Database ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ... Please run the following command: ...
    (microsoft.public.windows.server.sbs)
  • RE: ese error reported
    ... Thanks for posting in our newsgroup and also for Dave's input. ... 447 indicates that the logical database structure has become corrupted. ... Run the eseutil /p command against the dismounted database file. ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)