A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Main Menu Form Will Not Open



 
 
Thread Tools Display Modes
  #11  
Old August 10th, 2009, 12:30 AM posted to microsoft.public.access.forms
Brent
external usenet poster
 
Posts: 143
Default Main Menu Form Will Not Open

Hi Jeanette

This is where the compiler stops when I run debug on the Modules of the
database that I have converted to 2003. It just stops on this line and does
not give an error message.

your previous message:
I don't have Access 2000 on my computer anymore

The next thing to check is the code.
What code do you have when the database opens? It tell me Microsoft access
can not find the macro "mnuMain" I lkkoed and there are no macros in this
database not ever Auotexec macro
Is there an autoexec macro?
What code is on the main menu form? Do you want me to post all of the code I
found for the form? it is long.
How do I put break points on the subs and functions?

Gina asked that on the top of every module had
Option Explicit
Option Compare Database

Yes they do however they are in reverse order, does this matter?

Thanks again for all your help. This post maybe confusing, let me know





"Jeanette Cunningham" wrote:

Is this function the spot where the compiler stops and gives an error?
What error does it give?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their more to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which they
appear. Because Access 97 had some References that were unnecessary to
future versions, once you post what you have one or two may need to be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing the
problem.

3. Go into an module window and Debug - Complie and fix any errors that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO 3.6
Object
Library was already checked, I compacted and repaired a few times and
the
result is the same, the Main Menu Form will not open it still thinks I
have
not converted to a newer version. Could there be something in the code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as a
reference.
After you set that reference and close the references dialog, do a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database down. I
have
converted the database. This is the only form that will not open. I
open
the
database using the shift key and the main form will open in design
view.
Can
someone help with this problem?

Thanks









  #12  
Old August 10th, 2009, 03:08 AM posted to microsoft.public.access.forms
Brent
external usenet poster
 
Posts: 143
Default Main Menu Form Will Not Open

Gina

Yes, I did convert the database to 2003 but that seems to be the problem the
database done not think I have. It keeps asking for me to use a newer program
97 or newer and I am.



"Gina Whipp" wrote:

Brent,

Did you convert this database to Access 2003? Because according to the
Object Library you did not. So perhaps the better question is what version
is your databse?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
First of all thanks to Jeanette and Gina for your help with this problem.

I will start with listing the References I have checked in order from
first
to last:

1. Visual Basic for Applications
2. Microsoft Access 10.0 object Library
3. OLE Automation
4. Microsoft DOA 3.6 Object Library
5. Microsoft Active X Data Object 2.5 Library

Now I will try some of the other suggestions and this may take some time
as
I am not good with Modules and code issues.

I will post back results or if I have problems with the codes



"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which they
appear. Because Access 97 had some References that were unnecessary to
future versions, once you post what you have one or two may need to be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing the
problem.

3. Go into an module window and Debug - Complie and fix any errors that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO 3.6
Object
Library was already checked, I compacted and repaired a few times and
the
result is the same, the Main Menu Form will not open it still thinks I
have
not converted to a newer version. Could there be something in the code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as a
reference.
After you set that reference and close the references dialog, do a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database down. I
have
converted the database. This is the only form that will not open. I
open
the
database using the shift key and the main form will open in design
view.
Can
someone help with this problem?

Thanks









  #13  
Old August 10th, 2009, 03:21 AM posted to microsoft.public.access.forms
Brent
external usenet poster
 
Posts: 143
Default Main Menu Form Will Not Open

Gina

"Gina Whipp" wrote:

Brent,

Is this the line that is highlighted in yellow?

There is no yellow highlighted line the line above was in blue

Also, copy/paste the rest of the module here. This is from the form code


Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag As
String, fEnable As Boolean) As Boolean

Dim ctl As CommandBarControl

On Error GoTo Err_CMD_EnableCommandBarCtl
Call RecordTrace("basCmdFunctions", "CMD_EnableCommandBarCtl", pcbr.Name)
CMD_EnableCommandBarCtl = False

Set ctl = pcbr.FindControl(msoControlButton, Tag:=pstrTag,
Visible:=True, Recursive:=True)
ctl.Enabled = fEnable

CMD_EnableCommandBarCtl = True

Exit_CMD_EnableCommandBarCtl:
Exit Function

Err_CMD_EnableCommandBarCtl:
Select Case Err
Case 91 'Control doesn't exist
CMD_EnableCommandBarCtl = True
Case Else
Call GlobalError("basCmdFunctions" & ".CMD_EnableCommandBarCtl")
End Select
Resume Exit_CMD_EnableCommandBarCtl

End Function

Hope this helps


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their more to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which they
appear. Because Access 97 had some References that were unnecessary to
future versions, once you post what you have one or two may need to be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing the
problem.

3. Go into an module window and Debug - Complie and fix any errors that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO 3.6
Object
Library was already checked, I compacted and repaired a few times and
the
result is the same, the Main Menu Form will not open it still thinks I
have
not converted to a newer version. Could there be something in the code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as a
reference.
After you set that reference and close the references dialog, do a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database down. I
have
converted the database. This is the only form that will not open. I
open
the
database using the shift key and the main form will open in design
view.
Can
someone help with this problem?

Thanks









  #14  
Old August 10th, 2009, 03:21 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Main Menu Form Will Not Open

Option Explicit
Option Compare Database

should be in the order

Option Compare Database
Option Explicit


-------------------------
macros - that's fine. You have checked for macros and there are no macros.
That is one less thing to check for errors.

----------------------

About converting to A2003
One easy way that I do conversions is to create a new blank database in the
newer version and be sure to set 'Track Name Auto correct' to No.
So create a new blank database in A2003, go to Tools | Options | General tab
and set Track name autocorrect to no.

Do you have linked tables?
If you do, use the new blank database you just created and import the tables
into it (don't link them).

Then create another new blank database for the front end.
Link the tables to the new database, then import all the other objects -
queries, forms etc.

If you don't have linked tables, just create one new database as described
above.
Import everything from the 97 database to the new one.

After you finish the import do a compile.
Check for the correct references.

You will now have an A2003 version of your database and can continue on with
fixing any errors.




Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
news
Hi Jeanette

This is where the compiler stops when I run debug on the Modules of the
database that I have converted to 2003. It just stops on this line and
does
not give an error message.

your previous message:
I don't have Access 2000 on my computer anymore

The next thing to check is the code.
What code do you have when the database opens? It tell me Microsoft access
can not find the macro "mnuMain" I lkkoed and there are no macros in this
database not ever Auotexec macro
Is there an autoexec macro?
What code is on the main menu form? Do you want me to post all of the code
I
found for the form? it is long.
How do I put break points on the subs and functions?

Gina asked that on the top of every module had
Option Explicit
Option Compare Database

Yes they do however they are in reverse order, does this matter?

Thanks again for all your help. This post maybe confusing, let me know





"Jeanette Cunningham" wrote:

Is this function the spot where the compiler stops and gives an error?
What error does it give?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their more
to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which
they
appear. Because Access 97 had some References that were unnecessary
to
future versions, once you post what you have one or two may need to be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing the
problem.

3. Go into an module window and Debug - Complie and fix any errors
that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO
3.6
Object
Library was already checked, I compacted and repaired a few times
and
the
result is the same, the Main Menu Form will not open it still thinks
I
have
not converted to a newer version. Could there be something in the
code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design
view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as a
reference.
After you set that reference and close the references dialog, do a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS
Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database
down. I
have
converted the database. This is the only form that will not open.
I
open
the
database using the shift key and the main form will open in
design
view.
Can
someone help with this problem?

Thanks











  #15  
Old August 10th, 2009, 06:06 AM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Main Menu Form Will Not Open

Brent,

Jeanette has a great idea which is import your objects into a new clean 2003
database. Read her post and follow those directions and see if the problem
persists.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Gina

Yes, I did convert the database to 2003 but that seems to be the problem
the
database done not think I have. It keeps asking for me to use a newer
program
97 or newer and I am.



"Gina Whipp" wrote:

Brent,

Did you convert this database to Access 2003? Because according to the
Object Library you did not. So perhaps the better question is what
version
is your databse?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
First of all thanks to Jeanette and Gina for your help with this
problem.

I will start with listing the References I have checked in order from
first
to last:

1. Visual Basic for Applications
2. Microsoft Access 10.0 object Library
3. OLE Automation
4. Microsoft DOA 3.6 Object Library
5. Microsoft Active X Data Object 2.5 Library

Now I will try some of the other suggestions and this may take some
time
as
I am not good with Modules and code issues.

I will post back results or if I have problems with the codes



"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which
they
appear. Because Access 97 had some References that were unnecessary
to
future versions, once you post what you have one or two may need to be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing the
problem.

3. Go into an module window and Debug - Complie and fix any errors
that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO
3.6
Object
Library was already checked, I compacted and repaired a few times
and
the
result is the same, the Main Menu Form will not open it still thinks
I
have
not converted to a newer version. Could there be something in the
code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design
view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as a
reference.
After you set that reference and close the references dialog, do a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS
Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database
down. I
have
converted the database. This is the only form that will not open.
I
open
the
database using the shift key and the main form will open in
design
view.
Can
someone help with this problem?

Thanks











  #16  
Old August 14th, 2009, 08:57 PM posted to microsoft.public.access.forms
Brent
external usenet poster
 
Posts: 143
Default Main Menu Form Will Not Open

Hi Jeanette

Sorry for not getting back sooner but work got in the way.

Now that I have converted the database what should the new references be? it
looks like I still have the same old ones.

I now get this new error message

Microsoft can not find the macro "mnuMain" the macro groups don't exist or
it is new and has not been saved, then it talks about the macorgroup that was
saved
I must specify the same macroname in the argument???

Any ideas on this?




"Jeanette Cunningham" wrote:

Option Explicit
Option Compare Database

should be in the order

Option Compare Database
Option Explicit


-------------------------
macros - that's fine. You have checked for macros and there are no macros.
That is one less thing to check for errors.

----------------------

About converting to A2003
One easy way that I do conversions is to create a new blank database in the
newer version and be sure to set 'Track Name Auto correct' to No.
So create a new blank database in A2003, go to Tools | Options | General tab
and set Track name autocorrect to no.

Do you have linked tables?
If you do, use the new blank database you just created and import the tables
into it (don't link them).

Then create another new blank database for the front end.
Link the tables to the new database, then import all the other objects -
queries, forms etc.

If you don't have linked tables, just create one new database as described
above.
Import everything from the 97 database to the new one.

After you finish the import do a compile.
Check for the correct references.

You will now have an A2003 version of your database and can continue on with
fixing any errors.




Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
news
Hi Jeanette

This is where the compiler stops when I run debug on the Modules of the
database that I have converted to 2003. It just stops on this line and
does
not give an error message.

your previous message:
I don't have Access 2000 on my computer anymore

The next thing to check is the code.
What code do you have when the database opens? It tell me Microsoft access
can not find the macro "mnuMain" I lkkoed and there are no macros in this
database not ever Auotexec macro
Is there an autoexec macro?
What code is on the main menu form? Do you want me to post all of the code
I
found for the form? it is long.
How do I put break points on the subs and functions?

Gina asked that on the top of every module had
Option Explicit
Option Compare Database

Yes they do however they are in reverse order, does this matter?

Thanks again for all your help. This post maybe confusing, let me know





"Jeanette Cunningham" wrote:

Is this function the spot where the compiler stops and gives an error?
What error does it give?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their more
to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which
they
appear. Because Access 97 had some References that were unnecessary
to
future versions, once you post what you have one or two may need to be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing the
problem.

3. Go into an module window and Debug - Complie and fix any errors
that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO
3.6
Object
Library was already checked, I compacted and repaired a few times
and
the
result is the same, the Main Menu Form will not open it still thinks
I
have
not converted to a newer version. Could there be something in the
code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design
view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as a
reference.
After you set that reference and close the references dialog, do a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS
Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database
down. I
have
converted the database. This is the only form that will not open.
I
open
the
database using the shift key and the main form will open in
design
view.
Can
someone help with this problem?

Thanks












  #17  
Old August 15th, 2009, 12:50 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Main Menu Form Will Not Open

There are 3 references you need for A2003
Visual basic for applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library

When you imported all the objects, you may have ommitted the menus.
Go back to the import screen and under options select Menus and Toolbars.
Don't select any tables, queries etc, just the menus and toolbars.
See if this fixes the problem.

What is the name of the form that should open when the database opens?
Have you put this form as the startup form in the database options | Tools |
Startup
Display Form/Page:


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
...
Hi Jeanette

Sorry for not getting back sooner but work got in the way.

Now that I have converted the database what should the new references be?
it
looks like I still have the same old ones.

I now get this new error message

Microsoft can not find the macro "mnuMain" the macro groups don't exist or
it is new and has not been saved, then it talks about the macorgroup that
was
saved
I must specify the same macroname in the argument???

Any ideas on this?




"Jeanette Cunningham" wrote:

Option Explicit
Option Compare Database

should be in the order

Option Compare Database
Option Explicit


-------------------------
macros - that's fine. You have checked for macros and there are no
macros.
That is one less thing to check for errors.

----------------------

About converting to A2003
One easy way that I do conversions is to create a new blank database in
the
newer version and be sure to set 'Track Name Auto correct' to No.
So create a new blank database in A2003, go to Tools | Options | General
tab
and set Track name autocorrect to no.

Do you have linked tables?
If you do, use the new blank database you just created and import the
tables
into it (don't link them).

Then create another new blank database for the front end.
Link the tables to the new database, then import all the other objects -
queries, forms etc.

If you don't have linked tables, just create one new database as
described
above.
Import everything from the 97 database to the new one.

After you finish the import do a compile.
Check for the correct references.

You will now have an A2003 version of your database and can continue on
with
fixing any errors.




Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
news
Hi Jeanette

This is where the compiler stops when I run debug on the Modules of the
database that I have converted to 2003. It just stops on this line and
does
not give an error message.

your previous message:
I don't have Access 2000 on my computer anymore

The next thing to check is the code.
What code do you have when the database opens? It tell me Microsoft
access
can not find the macro "mnuMain" I lkkoed and there are no macros in
this
database not ever Auotexec macro
Is there an autoexec macro?
What code is on the main menu form? Do you want me to post all of the
code
I
found for the form? it is long.
How do I put break points on the subs and functions?

Gina asked that on the top of every module had
Option Explicit
Option Compare Database

Yes they do however they are in reverse order, does this matter?

Thanks again for all your help. This post maybe confusing, let me know





"Jeanette Cunningham" wrote:

Is this function the spot where the compiler stops and gives an error?
What error does it give?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag
As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their
more
to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which
they
appear. Because Access 97 had some References that were
unnecessary
to
future versions, once you post what you have one or two may need to
be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing
the
problem.

3. Go into an module window and Debug - Complie and fix any errors
that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO
3.6
Object
Library was already checked, I compacted and repaired a few times
and
the
result is the same, the Main Menu Form will not open it still
thinks
I
have
not converted to a newer version. Could there be something in the
code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design
view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as
a
reference.
After you set that reference and close the references dialog, do
a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria
Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS
Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database
down. I
have
converted the database. This is the only form that will not
open.
I
open
the
database using the shift key and the main form will open in
design
view.
Can
someone help with this problem?

Thanks














  #18  
Old August 16th, 2009, 11:31 PM posted to microsoft.public.access.forms
Brent
external usenet poster
 
Posts: 143
Default Main Menu Form Will Not Open

Hi Jeanette

Here is the code where the yellow highlight starts, I just found it. Do you
see anything in the code that is causing the problem? It looks to me like
there might be something here as it tells to stop application if !!!! The
form is in the startup

Public Function APPL_StartApplication() As Boolean

Dim fldEntityName As Field
Dim fldEntityPath As Field
Dim intI As Integer
Dim lngNumDatabases As Long
Dim qdfEntity As QueryDef
Dim rstEntity As Recordset
Dim strMsg As String

On Error GoTo Err_APPL_StartApplication
Call RecordTrace("basApplFunctions", "APPL_StartApplication")
APPL_StartApplication = False

TryRelink:
Set rstEntity = Nothing
If CMD_GetVersion() "8.0" Then
strMsg = gconSystemTitle & " must be run with Microsoft Access 97 or
later"
MsgBox strMsg, vbOKOnly + vbCritical, gconSystemTitle
Application.Quit A_EXIT
End If

Set gwrk = DBEngine.Workspaces(0)
Set gdb = CurrentDb

Set qdfEntity = gdb.QueryDefs("qselEntityDatabases")
Set rstEntity = qdfEntity.OpenRecordset
With rstEntity
.MoveLast
.MoveFirst
lngNumDatabases = .RecordCount
Set fldEntityName = .Fields("EntityName")
Set fldEntityPath = .Fields("EntityPath")
End With
ReDim gdbLinked(1 To lngNumDatabases)
intI = 0
With rstEntity
.MoveFirst
Do While Not .EOF
intI = intI + 1
Set gdbLinked(intI) = DBEngine.OpenDatabase(fldEntityPath & "\"
& fldEntityName)
.MoveNext
Loop
.Close
End With

'Set startup properties of database
If CMD_IsItMDE(CurrentDb) Then
Call CMD_SetStartupProperties
End If

APPL_StartApplication = True

Exit_APPL_StartApplication:
Exit Function

Err_APPL_StartApplication:
Select Case Err.Number
Case 3044, 3051, 3043
MBX_Ok "Unable to open the database " & fldEntityPath & "\" &
fldEntityName
If Not CMD_OpenForm("frmEntitymaintenance",
plngWindowMode:=acDialog) Then Resume Exit_APPL_StartApplication
Resume TryRelink
Case 10001 'Error in called procedure
Case Else
Call GlobalError("basApplFunctions" & ".APPL_StartApplication")
End Select
Resume Exit_APPL_StartApplication

End Function

Thanks again for all your help





"Jeanette Cunningham" wrote:

There are 3 references you need for A2003
Visual basic for applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library

When you imported all the objects, you may have ommitted the menus.
Go back to the import screen and under options select Menus and Toolbars.
Don't select any tables, queries etc, just the menus and toolbars.
See if this fixes the problem.

What is the name of the form that should open when the database opens?
Have you put this form as the startup form in the database options | Tools |
Startup
Display Form/Page:


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
...
Hi Jeanette

Sorry for not getting back sooner but work got in the way.

Now that I have converted the database what should the new references be?
it
looks like I still have the same old ones.

I now get this new error message

Microsoft can not find the macro "mnuMain" the macro groups don't exist or
it is new and has not been saved, then it talks about the macorgroup that
was
saved
I must specify the same macroname in the argument???

Any ideas on this?




"Jeanette Cunningham" wrote:

Option Explicit
Option Compare Database

should be in the order

Option Compare Database
Option Explicit


-------------------------
macros - that's fine. You have checked for macros and there are no
macros.
That is one less thing to check for errors.

----------------------

About converting to A2003
One easy way that I do conversions is to create a new blank database in
the
newer version and be sure to set 'Track Name Auto correct' to No.
So create a new blank database in A2003, go to Tools | Options | General
tab
and set Track name autocorrect to no.

Do you have linked tables?
If you do, use the new blank database you just created and import the
tables
into it (don't link them).

Then create another new blank database for the front end.
Link the tables to the new database, then import all the other objects -
queries, forms etc.

If you don't have linked tables, just create one new database as
described
above.
Import everything from the 97 database to the new one.

After you finish the import do a compile.
Check for the correct references.

You will now have an A2003 version of your database and can continue on
with
fixing any errors.




Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
news Hi Jeanette

This is where the compiler stops when I run debug on the Modules of the
database that I have converted to 2003. It just stops on this line and
does
not give an error message.

your previous message:
I don't have Access 2000 on my computer anymore

The next thing to check is the code.
What code do you have when the database opens? It tell me Microsoft
access
can not find the macro "mnuMain" I lkkoed and there are no macros in
this
database not ever Auotexec macro
Is there an autoexec macro?
What code is on the main menu form? Do you want me to post all of the
code
I
found for the form? it is long.
How do I put break points on the subs and functions?

Gina asked that on the top of every module had
Option Explicit
Option Compare Database

Yes they do however they are in reverse order, does this matter?

Thanks again for all your help. This post maybe confusing, let me know





"Jeanette Cunningham" wrote:

Is this function the spot where the compiler stops and gives an error?
What error does it give?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag
As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their
more
to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in which
they
appear. Because Access 97 had some References that were
unnecessary
to
future versions, once you post what you have one or two may need to
be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are causing
the
problem.

3. Go into an module window and Debug - Complie and fix any errors
that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft DAO
3.6
Object
Library was already checked, I compacted and repaired a few times
and
the
result is the same, the Main Menu Form will not open it still
thinks
I
have
not converted to a newer version. Could there be something in the
code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in design
view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library as
a
reference.
After you set that reference and close the references dialog, do
a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria
Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to MS
Access
2003.
The Main menu form will not open, I get a message that I must
convert
to a
newer version that 97 / 2000 and then it closes the database
down. I
have
converted the database. This is the only form that will not
open.
I
open
the
database using the shift key and the main form will open in
design
view.
Can
someone help with this problem?

Thanks















  #19  
Old August 17th, 2009, 02:31 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Main Menu Form Will Not Open

Here are the steps to debug this code:
Find the line Call RecordTrace("basApplFunctions",
"APPL_StartApplication")
and click in the very far left margin for this line to set a break point -
when it is set you will see the whole line coloured red.
Save and close the code window.
Close the startup form if it is open.
Now open the startup form.
The code will stop at the break point you set.
Now press F8 to step through the code.


Post back with results.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
...
Hi Jeanette

Here is the code where the yellow highlight starts, I just found it. Do
you
see anything in the code that is causing the problem? It looks to me like
there might be something here as it tells to stop application if !!!! The
form is in the startup

Public Function APPL_StartApplication() As Boolean

Dim fldEntityName As Field
Dim fldEntityPath As Field
Dim intI As Integer
Dim lngNumDatabases As Long
Dim qdfEntity As QueryDef
Dim rstEntity As Recordset
Dim strMsg As String

On Error GoTo Err_APPL_StartApplication
Call RecordTrace("basApplFunctions", "APPL_StartApplication")
APPL_StartApplication = False

TryRelink:
Set rstEntity = Nothing
If CMD_GetVersion() "8.0" Then
strMsg = gconSystemTitle & " must be run with Microsoft Access 97
or
later"
MsgBox strMsg, vbOKOnly + vbCritical, gconSystemTitle
Application.Quit A_EXIT
End If

Set gwrk = DBEngine.Workspaces(0)
Set gdb = CurrentDb

Set qdfEntity = gdb.QueryDefs("qselEntityDatabases")
Set rstEntity = qdfEntity.OpenRecordset
With rstEntity
.MoveLast
.MoveFirst
lngNumDatabases = .RecordCount
Set fldEntityName = .Fields("EntityName")
Set fldEntityPath = .Fields("EntityPath")
End With
ReDim gdbLinked(1 To lngNumDatabases)
intI = 0
With rstEntity
.MoveFirst
Do While Not .EOF
intI = intI + 1
Set gdbLinked(intI) = DBEngine.OpenDatabase(fldEntityPath & "\"
& fldEntityName)
.MoveNext
Loop
.Close
End With

'Set startup properties of database
If CMD_IsItMDE(CurrentDb) Then
Call CMD_SetStartupProperties
End If

APPL_StartApplication = True

Exit_APPL_StartApplication:
Exit Function

Err_APPL_StartApplication:
Select Case Err.Number
Case 3044, 3051, 3043
MBX_Ok "Unable to open the database " & fldEntityPath & "\" &
fldEntityName
If Not CMD_OpenForm("frmEntitymaintenance",
plngWindowMode:=acDialog) Then Resume Exit_APPL_StartApplication
Resume TryRelink
Case 10001 'Error in called procedure
Case Else
Call GlobalError("basApplFunctions" & ".APPL_StartApplication")
End Select
Resume Exit_APPL_StartApplication

End Function

Thanks again for all your help





"Jeanette Cunningham" wrote:

There are 3 references you need for A2003
Visual basic for applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library

When you imported all the objects, you may have ommitted the menus.
Go back to the import screen and under options select Menus and Toolbars.
Don't select any tables, queries etc, just the menus and toolbars.
See if this fixes the problem.

What is the name of the form that should open when the database opens?
Have you put this form as the startup form in the database options |
Tools |
Startup
Display Form/Page:


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
...
Hi Jeanette

Sorry for not getting back sooner but work got in the way.

Now that I have converted the database what should the new references
be?
it
looks like I still have the same old ones.

I now get this new error message

Microsoft can not find the macro "mnuMain" the macro groups don't exist
or
it is new and has not been saved, then it talks about the macorgroup
that
was
saved
I must specify the same macroname in the argument???

Any ideas on this?




"Jeanette Cunningham" wrote:

Option Explicit
Option Compare Database

should be in the order

Option Compare Database
Option Explicit


-------------------------
macros - that's fine. You have checked for macros and there are no
macros.
That is one less thing to check for errors.

----------------------

About converting to A2003
One easy way that I do conversions is to create a new blank database
in
the
newer version and be sure to set 'Track Name Auto correct' to No.
So create a new blank database in A2003, go to Tools | Options |
General
tab
and set Track name autocorrect to no.

Do you have linked tables?
If you do, use the new blank database you just created and import the
tables
into it (don't link them).

Then create another new blank database for the front end.
Link the tables to the new database, then import all the other
objects -
queries, forms etc.

If you don't have linked tables, just create one new database as
described
above.
Import everything from the 97 database to the new one.

After you finish the import do a compile.
Check for the correct references.

You will now have an A2003 version of your database and can continue
on
with
fixing any errors.




Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
news Hi Jeanette

This is where the compiler stops when I run debug on the Modules of
the
database that I have converted to 2003. It just stops on this line
and
does
not give an error message.

your previous message:
I don't have Access 2000 on my computer anymore

The next thing to check is the code.
What code do you have when the database opens? It tell me Microsoft
access
can not find the macro "mnuMain" I lkkoed and there are no macros
in
this
database not ever Auotexec macro
Is there an autoexec macro?
What code is on the main menu form? Do you want me to post all of
the
code
I
found for the form? it is long.
How do I put break points on the subs and functions?

Gina asked that on the top of every module had
Option Explicit
Option Compare Database

Yes they do however they are in reverse order, does this matter?

Thanks again for all your help. This post maybe confusing, let me
know





"Jeanette Cunningham" wrote:

Is this function the spot where the compiler stops and gives an
error?
What error does it give?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar,
pstrTag
As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their
more
to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in
which
they
appear. Because Access 97 had some References that were
unnecessary
to
future versions, once you post what you have one or two may need
to
be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

This will insure the are no undeclared variables that are
causing
the
problem.

3. Go into an module window and Debug - Complie and fix any
errors
that
might appear.

--
Gina Whipp

"I feel I have been denied critical, need to know,
information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Brent" wrote in message
...
Thanks Jeanette
When I opened the code and check the references the Microsoft
DAO
3.6
Object
Library was already checked, I compacted and repaired a few
times
and
the
result is the same, the Main Menu Form will not open it still
thinks
I
have
not converted to a newer version. Could there be something in
the
code
somewhere that is causing this? if so where can i find it?

"Jeanette Cunningham" wrote:

Hi Brent,
When you have the database open and the main form open in
design
view,
open
the code window and check the references.
You will need to select the Microsoft DAO 3.6 Object Library
as
a
reference.
After you set that reference and close the references dialog,
do
a
compile
and fix any errors until the code compiles.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria
Australia



"Brent" wrote in message
...
I have just converted a database from version 97 / 2000 to
MS
Access
2003.
The Main menu form will not open, I get a message that I
must
convert
to a
newer version that 97 / 2000 and then it closes the
database
down. I
have
converted the database. This is the only form that will not
open.
I
open
the
database using the shift key and the main form will open in
design
view.
Can
someone help with this problem?

Thanks

















  #20  
Old August 17th, 2009, 03:11 AM posted to microsoft.public.access.forms
Brent
external usenet poster
 
Posts: 143
Default Main Menu Form Will Not Open


Jeannette

Here is the first place the code stoped at I pressed F8

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar, pstrTag As
String, fEnable As Boolean) As Boolean

Compile error user-defined type not defined

I can not proceed pass this line.

Thanks



"Jeanette Cunningham" wrote:

Here are the steps to debug this code:
Find the line Call RecordTrace("basApplFunctions",
"APPL_StartApplication")
and click in the very far left margin for this line to set a break point -
when it is set you will see the whole line coloured red.
Save and close the code window.
Close the startup form if it is open.
Now open the startup form.
The code will stop at the break point you set.
Now press F8 to step through the code.


Post back with results.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
...
Hi Jeanette

Here is the code where the yellow highlight starts, I just found it. Do
you
see anything in the code that is causing the problem? It looks to me like
there might be something here as it tells to stop application if !!!! The
form is in the startup

Public Function APPL_StartApplication() As Boolean

Dim fldEntityName As Field
Dim fldEntityPath As Field
Dim intI As Integer
Dim lngNumDatabases As Long
Dim qdfEntity As QueryDef
Dim rstEntity As Recordset
Dim strMsg As String

On Error GoTo Err_APPL_StartApplication
Call RecordTrace("basApplFunctions", "APPL_StartApplication")
APPL_StartApplication = False

TryRelink:
Set rstEntity = Nothing
If CMD_GetVersion() "8.0" Then
strMsg = gconSystemTitle & " must be run with Microsoft Access 97
or
later"
MsgBox strMsg, vbOKOnly + vbCritical, gconSystemTitle
Application.Quit A_EXIT
End If

Set gwrk = DBEngine.Workspaces(0)
Set gdb = CurrentDb

Set qdfEntity = gdb.QueryDefs("qselEntityDatabases")
Set rstEntity = qdfEntity.OpenRecordset
With rstEntity
.MoveLast
.MoveFirst
lngNumDatabases = .RecordCount
Set fldEntityName = .Fields("EntityName")
Set fldEntityPath = .Fields("EntityPath")
End With
ReDim gdbLinked(1 To lngNumDatabases)
intI = 0
With rstEntity
.MoveFirst
Do While Not .EOF
intI = intI + 1
Set gdbLinked(intI) = DBEngine.OpenDatabase(fldEntityPath & "\"
& fldEntityName)
.MoveNext
Loop
.Close
End With

'Set startup properties of database
If CMD_IsItMDE(CurrentDb) Then
Call CMD_SetStartupProperties
End If

APPL_StartApplication = True

Exit_APPL_StartApplication:
Exit Function

Err_APPL_StartApplication:
Select Case Err.Number
Case 3044, 3051, 3043
MBX_Ok "Unable to open the database " & fldEntityPath & "\" &
fldEntityName
If Not CMD_OpenForm("frmEntitymaintenance",
plngWindowMode:=acDialog) Then Resume Exit_APPL_StartApplication
Resume TryRelink
Case 10001 'Error in called procedure
Case Else
Call GlobalError("basApplFunctions" & ".APPL_StartApplication")
End Select
Resume Exit_APPL_StartApplication

End Function

Thanks again for all your help





"Jeanette Cunningham" wrote:

There are 3 references you need for A2003
Visual basic for applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library

When you imported all the objects, you may have ommitted the menus.
Go back to the import screen and under options select Menus and Toolbars.
Don't select any tables, queries etc, just the menus and toolbars.
See if this fixes the problem.

What is the name of the form that should open when the database opens?
Have you put this form as the startup form in the database options |
Tools |
Startup
Display Form/Page:


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
...
Hi Jeanette

Sorry for not getting back sooner but work got in the way.

Now that I have converted the database what should the new references
be?
it
looks like I still have the same old ones.

I now get this new error message

Microsoft can not find the macro "mnuMain" the macro groups don't exist
or
it is new and has not been saved, then it talks about the macorgroup
that
was
saved
I must specify the same macroname in the argument???

Any ideas on this?




"Jeanette Cunningham" wrote:

Option Explicit
Option Compare Database

should be in the order

Option Compare Database
Option Explicit


-------------------------
macros - that's fine. You have checked for macros and there are no
macros.
That is one less thing to check for errors.

----------------------

About converting to A2003
One easy way that I do conversions is to create a new blank database
in
the
newer version and be sure to set 'Track Name Auto correct' to No.
So create a new blank database in A2003, go to Tools | Options |
General
tab
and set Track name autocorrect to no.

Do you have linked tables?
If you do, use the new blank database you just created and import the
tables
into it (don't link them).

Then create another new blank database for the front end.
Link the tables to the new database, then import all the other
objects -
queries, forms etc.

If you don't have linked tables, just create one new database as
described
above.
Import everything from the 97 database to the new one.

After you finish the import do a compile.
Check for the correct references.

You will now have an A2003 version of your database and can continue
on
with
fixing any errors.




Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Brent" wrote in message
news Hi Jeanette

This is where the compiler stops when I run debug on the Modules of
the
database that I have converted to 2003. It just stops on this line
and
does
not give an error message.

your previous message:
I don't have Access 2000 on my computer anymore

The next thing to check is the code.
What code do you have when the database opens? It tell me Microsoft
access
can not find the macro "mnuMain" I lkkoed and there are no macros
in
this
database not ever Auotexec macro
Is there an autoexec macro?
What code is on the main menu form? Do you want me to post all of
the
code
I
found for the form? it is long.
How do I put break points on the subs and functions?

Gina asked that on the top of every module had
Option Explicit
Option Compare Database

Yes they do however they are in reverse order, does this matter?

Thanks again for all your help. This post maybe confusing, let me
know





"Jeanette Cunningham" wrote:

Is this function the spot where the compiler stops and gives an
error?
What error does it give?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Brent" wrote in message
...
Here is me first debug problem that is identified

Public Function CMD_EnableCommandBarCtl(pcbr As CommandBar,
pstrTag
As
String, fEnable As Boolean) As Boolean

This shows up in each Module I debug. Does this help or is their
more
to
this that I need to post?

"Gina Whipp" wrote:

Brent,

Things I would check...

1. Please list the References you have set and the order in
which
they
appear. Because Access 97 had some References that were
unnecessary
to
future versions, once you post what you have one or two may need
to
be
eliminated to 'fix' the Main Menu.

2. Make sure at the top of every module appears...

Option Explicit
Option Compare Database

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.