OnOpen Code Problem Still Exists After Workarounds

D

David Burkhart

The saga continues.

Running XP Pro, SP3 Build 2600. I downloaded the Allen Browne discussion of
Access 10 vs 12 code conflicts on Vista. That seemed to describe my problem
exactly except I am on XP Pro. Implemented Option 1: Modify Registry. Tried
to run my Access 10 code and got the same OnOpen error as before.

Depression set in.

Removed the evaluation version of Office 2007 from the PC; Allen's Option 5.
After restart, checked References of my code and found Access 12 no longer
referenced.

Brighter day.

Tried to run Access 10 code. Failed on same OnOpen error as before.

Depression, again.

Moved code to a PC that is XP Pro, SP3, Build 2600 that has never seen
Office 2007 or Access 12.

Ever hopefull.

Tried to run the code. Failed on same OnOpen error as before. Checked
References, Access 12 not referenced.

Depression, again.

I would begin to doubt my code except I can take the code to a PC at work
(XP Pro, SP? Build?) and the code runs fine. That PC has Access 11 (Office
2003) installed.

Ideas anyone? Any help would be appreciated.

drb
 
D

David Burkhart

Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable line of code
in the function, but I never get to it. As I've said before, this code has
worked perfectly for years on its usual machine which has never seen Access
12 so I'm pretty certain the code is OK and the problem is interaction with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) + ".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
 
G

Gina Whipp

What are the references you have set in the one that works and the one that
doesn't work? The code looks fine!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

David Burkhart said:
Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable line of
code
in the function, but I never get to it. As I've said before, this code
has
worked perfectly for years on its usual machine which has never seen
Access
12 so I'm pretty certain the code is OK and the problem is interaction
with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) + ".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
-----------

Any ideas greatfully accepted.

drb

--
David Burkhart


Gina Whipp said:
What is the On_Open code?

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
 
D

David Burkhart

Gina --

I'll post the two references after I get home from work Monday -- Need to
get the one that works from the computer at work.

drb
--
David Burkhart


Gina Whipp said:
What are the references you have set in the one that works and the one that
doesn't work? The code looks fine!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

David Burkhart said:
Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable line of
code
in the function, but I never get to it. As I've said before, this code
has
worked perfectly for years on its usual machine which has never seen
Access
12 so I'm pretty certain the code is OK and the problem is interaction
with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) + ".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
-----------

Any ideas greatfully accepted.

drb

--
David Burkhart


Gina Whipp said:
What is the On_Open code?

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
The saga continues.

Running XP Pro, SP3 Build 2600. I downloaded the Allen Browne
discussion
of
Access 10 vs 12 code conflicts on Vista. That seemed to describe my
problem
exactly except I am on XP Pro. Implemented Option 1: Modify Registry.
Tried
to run my Access 10 code and got the same OnOpen error as before.

Depression set in.

Removed the evaluation version of Office 2007 from the PC; Allen's
Option
5.
After restart, checked References of my code and found Access 12 no
longer
referenced.

Brighter day.

Tried to run Access 10 code. Failed on same OnOpen error as before.

Depression, again.

Moved code to a PC that is XP Pro, SP3, Build 2600 that has never seen
Office 2007 or Access 12.

Ever hopefull.

Tried to run the code. Failed on same OnOpen error as before. Checked
References, Access 12 not referenced.

Depression, again.

I would begin to doubt my code except I can take the code to a PC at
work
(XP Pro, SP? Build?) and the code runs fine. That PC has Access 11
(Office
2003) installed.

Ideas anyone? Any help would be appreciated.

drb
 
G

Gina Whipp

Okay, great!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

David Burkhart said:
Gina --

I'll post the two references after I get home from work Monday -- Need to
get the one that works from the computer at work.

drb
--
David Burkhart


Gina Whipp said:
What are the references you have set in the one that works and the one
that
doesn't work? The code looks fine!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable line of
code
in the function, but I never get to it. As I've said before, this code
has
worked perfectly for years on its usual machine which has never seen
Access
12 so I'm pretty certain the code is OK and the problem is interaction
with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) +
".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
-----------

Any ideas greatfully accepted.

drb

--
David Burkhart


:

What is the On_Open code?

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
The saga continues.

Running XP Pro, SP3 Build 2600. I downloaded the Allen Browne
discussion
of
Access 10 vs 12 code conflicts on Vista. That seemed to describe my
problem
exactly except I am on XP Pro. Implemented Option 1: Modify
Registry.
Tried
to run my Access 10 code and got the same OnOpen error as before.

Depression set in.

Removed the evaluation version of Office 2007 from the PC; Allen's
Option
5.
After restart, checked References of my code and found Access 12 no
longer
referenced.

Brighter day.

Tried to run Access 10 code. Failed on same OnOpen error as before.

Depression, again.

Moved code to a PC that is XP Pro, SP3, Build 2600 that has never
seen
Office 2007 or Access 12.

Ever hopefull.

Tried to run the code. Failed on same OnOpen error as before.
Checked
References, Access 12 not referenced.

Depression, again.

I would begin to doubt my code except I can take the code to a PC at
work
(XP Pro, SP? Build?) and the code runs fine. That PC has Access 11
(Office
2003) installed.

Ideas anyone? Any help would be appreciated.

drb
 
D

David Burkhart

Gina --

OK, here we go, in the order they appear in the list here are the References:

From usual PC at work where code runs:
Visual Basic for Applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 11.0 Object Library

Just for grins and giggles I tried the code on a PC at work that has Access
12. Code runs fiune. Here are the References:
Visual Basic for Applications
Microsoft Access 12.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 12.0 Object Library

For the PC at home where the code bombs out:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 10.0 Object Library

To my eyes the only difference between PCs is the version of Access that is
available. Is it possible there is an incompatability between Access 10 and
any of the other References?

I'm at a total loss.

Any help greatly appreciated.

drb
--
David Burkhart


Gina Whipp said:
Okay, great!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

David Burkhart said:
Gina --

I'll post the two references after I get home from work Monday -- Need to
get the one that works from the computer at work.

drb
--
David Burkhart


Gina Whipp said:
What are the references you have set in the one that works and the one
that
doesn't work? The code looks fine!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable line of
code
in the function, but I never get to it. As I've said before, this code
has
worked perfectly for years on its usual machine which has never seen
Access
12 so I'm pretty certain the code is OK and the problem is interaction
with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) +
".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
-----------

Any ideas greatfully accepted.

drb

--
David Burkhart


:

What is the On_Open code?

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
The saga continues.

Running XP Pro, SP3 Build 2600. I downloaded the Allen Browne
discussion
of
Access 10 vs 12 code conflicts on Vista. That seemed to describe my
problem
exactly except I am on XP Pro. Implemented Option 1: Modify
Registry.
Tried
to run my Access 10 code and got the same OnOpen error as before.

Depression set in.

Removed the evaluation version of Office 2007 from the PC; Allen's
Option
5.
After restart, checked References of my code and found Access 12 no
longer
referenced.

Brighter day.

Tried to run Access 10 code. Failed on same OnOpen error as before.

Depression, again.

Moved code to a PC that is XP Pro, SP3, Build 2600 that has never
seen
Office 2007 or Access 12.

Ever hopefull.

Tried to run the code. Failed on same OnOpen error as before.
Checked
References, Access 12 not referenced.

Depression, again.

I would begin to doubt my code except I can take the code to a PC at
work
(XP Pro, SP? Build?) and the code runs fine. That PC has Access 11
(Office
2003) installed.

Ideas anyone? Any help would be appreciated.

drb
 
G

Gina Whipp

David,

I would tend to think that the Microsoft Access 10.0 Object Library or the
Microsoft Office 10.0 Object Library can't 'translate' the later libraries
because something wan't available then that is in one of the later
libraries. Which would 'jive' with your "...incompatability..."!

Do you have Option Compare Database, as well as, Option Explicit at the top
of your form module window? If you do what ahppens when you try to Compile
in Access 2002. Make a back-up first!!!! Let's make sure that there's no
'bad' lines of code or undeclared functions, etc...

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

David Burkhart said:
Gina --

OK, here we go, in the order they appear in the list here are the
References:

From usual PC at work where code runs:
Visual Basic for Applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 11.0 Object Library

Just for grins and giggles I tried the code on a PC at work that has
Access
12. Code runs fiune. Here are the References:
Visual Basic for Applications
Microsoft Access 12.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 12.0 Object Library

For the PC at home where the code bombs out:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 10.0 Object Library

To my eyes the only difference between PCs is the version of Access that
is
available. Is it possible there is an incompatability between Access 10
and
any of the other References?

I'm at a total loss.

Any help greatly appreciated.

drb
--
David Burkhart


Gina Whipp said:
Okay, great!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

I'll post the two references after I get home from work Monday -- Need
to
get the one that works from the computer at work.

drb
--
David Burkhart


:

What are the references you have set in the one that works and the one
that
doesn't work? The code looks fine!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable line
of
code
in the function, but I never get to it. As I've said before, this
code
has
worked perfectly for years on its usual machine which has never seen
Access
12 so I'm pretty certain the code is OK and the problem is
interaction
with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) +
".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
-----------

Any ideas greatfully accepted.

drb

--
David Burkhart


:

What is the On_Open code?

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
The saga continues.

Running XP Pro, SP3 Build 2600. I downloaded the Allen Browne
discussion
of
Access 10 vs 12 code conflicts on Vista. That seemed to describe
my
problem
exactly except I am on XP Pro. Implemented Option 1: Modify
Registry.
Tried
to run my Access 10 code and got the same OnOpen error as before.

Depression set in.

Removed the evaluation version of Office 2007 from the PC;
Allen's
Option
5.
After restart, checked References of my code and found Access 12
no
longer
referenced.

Brighter day.

Tried to run Access 10 code. Failed on same OnOpen error as
before.

Depression, again.

Moved code to a PC that is XP Pro, SP3, Build 2600 that has never
seen
Office 2007 or Access 12.

Ever hopefull.

Tried to run the code. Failed on same OnOpen error as before.
Checked
References, Access 12 not referenced.

Depression, again.

I would begin to doubt my code except I can take the code to a PC
at
work
(XP Pro, SP? Build?) and the code runs fine. That PC has Access
11
(Office
2003) installed.

Ideas anyone? Any help would be appreciated.

drb
 
D

David Burkhart

Gina --

This is the second try at a response. The first response was apparently
eaten and spit out by the MS servers as too distastefull.

Option Compare Database and Option Explicit at the top of every form code
module. I had never used "Compile" before so it took a while to locate it
(MS Help was of no help in finding it !). Compile revealed a few undefined
variables in obscure routines (I copied the code from other projects) and an
unused module. When I fixed or deleted the "nasty code" compile found, Viola
! The code runs on the PC that would not run it before.

Since I developed the code in Access 10, but later Access 10 would not run
the code I can only guess that some patch or service pack for Access 10 or
Office 10 plugged a hole in Access 10. Of course the "nasty code" runs on
Access 11 and 12. Does this mean there is a hole waiting to be found in
Access 11 and 12?

Thank you very much for sticking with me and solving my problem when it
wasn't yours to worry about. That's a sign of a true professional. You gave
me a new tool for my tool kit. I shudder to think what it will reveal when I
run it on the code in my other projects?

I'll be forever gratefull for the help. Again, thank you very much. You
are the greatest.

drb

--
David Burkhart


Gina Whipp said:
David,

I would tend to think that the Microsoft Access 10.0 Object Library or the
Microsoft Office 10.0 Object Library can't 'translate' the later libraries
because something wan't available then that is in one of the later
libraries. Which would 'jive' with your "...incompatability..."!

Do you have Option Compare Database, as well as, Option Explicit at the top
of your form module window? If you do what ahppens when you try to Compile
in Access 2002. Make a back-up first!!!! Let's make sure that there's no
'bad' lines of code or undeclared functions, etc...

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

David Burkhart said:
Gina --

OK, here we go, in the order they appear in the list here are the
References:

From usual PC at work where code runs:
Visual Basic for Applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 11.0 Object Library

Just for grins and giggles I tried the code on a PC at work that has
Access
12. Code runs fiune. Here are the References:
Visual Basic for Applications
Microsoft Access 12.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 12.0 Object Library

For the PC at home where the code bombs out:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 10.0 Object Library

To my eyes the only difference between PCs is the version of Access that
is
available. Is it possible there is an incompatability between Access 10
and
any of the other References?

I'm at a total loss.

Any help greatly appreciated.

drb
--
David Burkhart


Gina Whipp said:
Okay, great!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

I'll post the two references after I get home from work Monday -- Need
to
get the one that works from the computer at work.

drb
--
David Burkhart


:

What are the references you have set in the one that works and the one
that
doesn't work? The code looks fine!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable line
of
code
in the function, but I never get to it. As I've said before, this
code
has
worked perfectly for years on its usual machine which has never seen
Access
12 so I'm pretty certain the code is OK and the problem is
interaction
with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) +
".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
-----------

Any ideas greatfully accepted.

drb

--
David Burkhart


:

What is the On_Open code?

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
The saga continues.

Running XP Pro, SP3 Build 2600. I downloaded the Allen Browne
discussion
of
Access 10 vs 12 code conflicts on Vista. That seemed to describe
my
problem
exactly except I am on XP Pro. Implemented Option 1: Modify
Registry.
Tried
to run my Access 10 code and got the same OnOpen error as before.

Depression set in.

Removed the evaluation version of Office 2007 from the PC;
Allen's
Option
5.
After restart, checked References of my code and found Access 12
no
longer
referenced.

Brighter day.

Tried to run Access 10 code. Failed on same OnOpen error as
before.

Depression, again.

Moved code to a PC that is XP Pro, SP3, Build 2600 that has never
seen
Office 2007 or Access 12.

Ever hopefull.

Tried to run the code. Failed on same OnOpen error as before.
Checked
References, Access 12 not referenced.

Depression, again.

I would begin to doubt my code except I can take the code to a PC
at
work
(XP Pro, SP? Build?) and the code runs fine. That PC has Access
11
(Office
2003) installed.

Ideas anyone? Any help would be appreciated.

drb
 
G

Gina Whipp

David,

THANK YOU for the kind words... and glad to have been of help.

Sorry I didn't point out where to Compile, I took for granted that you had
used that before. Using Compile does NOT guarantee your code will run but
it will help to find undefined functions and/or variables, etc... which
would prevent otherwise perfect code from running.

As for the code running/not running depending depending on versions...
well, think of dominos, touch one and they may all fall over or just one.
Whatever they 'fixed' that lets the code run in 2003 and 2007 is probably
waiting for another 'fix' for that same code to stop functioning! However,
'good' compiled code can usually hold up the other dominos no matter how
many fall on it!

Happy Coding!
Gina Whipp

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

http://www.regina-whipp.com/index.htm

David Burkhart said:
Gina --

This is the second try at a response. The first response was apparently
eaten and spit out by the MS servers as too distastefull.

Option Compare Database and Option Explicit at the top of every form code
module. I had never used "Compile" before so it took a while to locate it
(MS Help was of no help in finding it !). Compile revealed a few
undefined
variables in obscure routines (I copied the code from other projects) and
an
unused module. When I fixed or deleted the "nasty code" compile found,
Viola
! The code runs on the PC that would not run it before.

Since I developed the code in Access 10, but later Access 10 would not run
the code I can only guess that some patch or service pack for Access 10 or
Office 10 plugged a hole in Access 10. Of course the "nasty code" runs on
Access 11 and 12. Does this mean there is a hole waiting to be found in
Access 11 and 12?

Thank you very much for sticking with me and solving my problem when it
wasn't yours to worry about. That's a sign of a true professional. You
gave
me a new tool for my tool kit. I shudder to think what it will reveal
when I
run it on the code in my other projects?

I'll be forever gratefull for the help. Again, thank you very much. You
are the greatest.

drb

--
David Burkhart


Gina Whipp said:
David,

I would tend to think that the Microsoft Access 10.0 Object Library or
the
Microsoft Office 10.0 Object Library can't 'translate' the later
libraries
because something wan't available then that is in one of the later
libraries. Which would 'jive' with your "...incompatability..."!

Do you have Option Compare Database, as well as, Option Explicit at the
top
of your form module window? If you do what ahppens when you try to
Compile
in Access 2002. Make a back-up first!!!! Let's make sure that there's
no
'bad' lines of code or undeclared functions, etc...

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

OK, here we go, in the order they appear in the list here are the
References:

From usual PC at work where code runs:
Visual Basic for Applications
Microsoft Access 11.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 11.0 Object Library

Just for grins and giggles I tried the code on a PC at work that has
Access
12. Code runs fiune. Here are the References:
Visual Basic for Applications
Microsoft Access 12.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 12.0 Object Library

For the PC at home where the code bombs out:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Ole Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office 10.0 Object Library

To my eyes the only difference between PCs is the version of Access
that
is
available. Is it possible there is an incompatability between Access
10
and
any of the other References?

I'm at a total loss.

Any help greatly appreciated.

drb
--
David Burkhart


:

Okay, great!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

I'll post the two references after I get home from work Monday --
Need
to
get the one that works from the computer at work.

drb
--
David Burkhart


:

What are the references you have set in the one that works and the
one
that
doesn't work? The code looks fine!

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

message
Gina --

Here's the code. I've left out the declarations.

As part of my testing I've put a break at the first executable
line
of
code
in the function, but I never get to it. As I've said before,
this
code
has
worked perfectly for years on its usual machine which has never
seen
Access
12 so I'm pretty certain the code is OK and the problem is
interaction
with
Access 12.

-----------------
frmSplash, On_Open Event Code

=setstartuptimer()

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

Set Startup Timer Code

Function SetStartUpTimer()
DoCmd.Hourglass True
'Set timer for 6 seconds
Forms![frmSplash].TimerInterval = 6000

'Set default Colors
'gnRGBbaseB = vbWhite
'gnRGBbaseF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBeditB = vbRed 'RGB(255, 128, 192) 'Pink
'gnRGBeditF = vbBlack 'RGB(0, 0, 0) 'Black
'gnRGBviewB = vbBlue 'RGB(0, 0, 255) 'Blue
'gnRGBviewF = vbWhite 'RGB(255, 255, 255) 'White
gnRGBbaseB = 16777215
gnRGBbaseF = 0
gnRGBviewB = 16744448
gnRGBviewF = 16777215
gnRGBeditB = 12615935
gnRGBeditF = 0

'Housekeeping done only on startup
'Use presence of username to prevent display of
' frmLogIn when displaying 'About' from help menu
If gcUserName = Empty Then
'Revised 6/17/03 to look for .INI file in
' same folder as the application program mdb
'Set ini name
gcIniName = "COFSwrTrak.INI"
'Set ini location
gcHome = GetDBDir()
gcIniFile = gcHome + gcIniName
'Check database table links
Dim rtnValue As Variant
'Is link value in _.ini ?
Dim cSection As String
Dim cEntry As String
Dim cValue As String
Dim l_Location As String
cSection = Mid(gcIniName, 1, Len(gcIniName) - 4) +
".DataLocation"
cValue = ReadPvtini(cSection, "CurrentData", gcIniFile)
If cValue <> "" Then
' found it, set it up
l_Location = cValue
Else
'mising, force user to find
l_Location = "data"
End If
DoCmd.Hourglass False
'Check database table links
rtnValue = adhVerifyLinks(l_Location, "Report")
'rtnValue = adhVerifyLinks("SwrTrak_Data.Mdb", "Report")
rtnValue = SysCmd(acSysCmdRemoveMeter)
End If 'startup housekeeping
DoCmd.Hourglass False
End Function
-----------

Any ideas greatfully accepted.

drb

--
David Burkhart


:

What is the On_Open code?

--
Gina Whipp

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

http://www.regina-whipp.com/index.htm

in
message
The saga continues.

Running XP Pro, SP3 Build 2600. I downloaded the Allen Browne
discussion
of
Access 10 vs 12 code conflicts on Vista. That seemed to
describe
my
problem
exactly except I am on XP Pro. Implemented Option 1: Modify
Registry.
Tried
to run my Access 10 code and got the same OnOpen error as
before.

Depression set in.

Removed the evaluation version of Office 2007 from the PC;
Allen's
Option
5.
After restart, checked References of my code and found Access
12
no
longer
referenced.

Brighter day.

Tried to run Access 10 code. Failed on same OnOpen error as
before.

Depression, again.

Moved code to a PC that is XP Pro, SP3, Build 2600 that has
never
seen
Office 2007 or Access 12.

Ever hopefull.

Tried to run the code. Failed on same OnOpen error as before.
Checked
References, Access 12 not referenced.

Depression, again.

I would begin to doubt my code except I can take the code to a
PC
at
work
(XP Pro, SP? Build?) and the code runs fine. That PC has
Access
11
(Office
2003) installed.

Ideas anyone? Any help would be appreciated.

drb
 

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