Re: code not running on initial open
jimrwest_at_earthlink.net
Date: 02/14/05
- Next message: Ken Snell [MVP]: "Re: VBA Code for Combo Box to Find Record"
- Previous message: Fysh: "RE: Picture (Image) Loading problem"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: Ken Snell [MVP]: "Re: VBA Code for Combo Box to Find Record"
- Previous message: Fysh: "RE: Picture (Image) Loading problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|