.ldb file problem after 97 > 2002 conversion

J

Joel Wiseheart

The plot thickens....

My DB uses the OnClose event of one form to open the next.
The sequence is:

f_Logon (custom form)
f_Splash (custom form)
Switchboard (from Switchboard Manager built into Access)

As an experiment, I changed f_Splash OnClose event to open
a form other than the Switchboard. Only one logon appears
in the .ldb file. If I open the DB window (it auto-hides
on openeing the DB), there is still only one logon. As
soon as I open the Switchboard form, the second logon
appears.

This leads me to belive that when I converted from 97 to
2002, something in the code behind the Switchboard form is
creating a second logon.

Any ideas?
Thanks!
 
J

Joel Wiseheart

The plot approaches the climax....

I pinpointed it to a single line of code. In the
Siwtchboard form (keeping in mind that the switchboard was
created in 97 and converted to 2002), In the FillOptions
function, it creates a second entry in the .ldb file when
it executes the "Set dbs = CurrentDb()" line. I don't know
why.

Perhaps this is an ADO vs. DAO thing?
 
D

david epsom dot com dot au

I'm not surprised that you get another connection when you create a new
database object.
I'm not surprised that it is a <problem> in A2K2, compoared to A97.

I can see two possible solutions:

a) Set dbs = application.DBEngine(0)(0)
(not perfect, because rarely DBEngine(0)(0) is not CurrentDB)

or
b) make sure you close dbs (and set dbs to nothing) before
you try to switch to design mode. This may be as simple
as making sure that the switchboard form is closed before
you try to switch to design mode.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top