By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,156 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,156 IT Pros & Developers. It's quick & easy.

Problems with Registry Functions under A2002

P: n/a
I am getting and setting registry values successfully with two functions
from
the Getz/Litwin/Gilbert book: adh_accRegGetVal and adh_accRegWriteVal.

I have two cases now where these do not work under Access 2002. There is
no error, the GetKey function based on adh_accRegGetVal simply returns a
zero length string every time.

In both cases the PC also had the 97 Runtime installed on them. Would this
cause a conflict in this area? I have 97 and 2000 on my PC and the
functions work just fine and on every other machine I've tested except
those with Access 2002.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
I don't have copies of that code handy, but I can't imagine any reason why
having the 97 runtime would affect the use of an OS API call. Are you sure
the key actually exists on the machine(s) in question?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:2p************@uni-berlin.de...
I am getting and setting registry values successfully with two functions
from
the Getz/Litwin/Gilbert book: adh_accRegGetVal and adh_accRegWriteVal.

I have two cases now where these do not work under Access 2002. There is
no error, the GetKey function based on adh_accRegGetVal simply returns a
zero length string every time.

In both cases the PC also had the 97 Runtime installed on them. Would this cause a conflict in this area? I have 97 and 2000 on my PC and the
functions work just fine and on every other machine I've tested except
those with Access 2002.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #2

P: n/a
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:2Q*******************@news01.bloor.is.net.cab le.rogers.com...
I don't have copies of that code handy, but I can't imagine any reason why
having the 97 runtime would affect the use of an OS API call. Are you sure
the key actually exists on the machine(s) in question?


Yeah, they're definitely there. My concern is that the API reference is to
MSAccess.exe. What exactly does this reference mean when there are multiple
versions of Access installed? Is it "the last one used" like the file
registration and if so, should any/all of them work the same way?

Nov 13 '05 #3

P: n/a
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:2p************@uni-berlin.de...
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:2Q*******************@news01.bloor.is.net.cab le.rogers.com...
I don't have copies of that code handy, but I can't imagine any reason why having the 97 runtime would affect the use of an OS API call. Are you sure the key actually exists on the machine(s) in question?
Yeah, they're definitely there. My concern is that the API reference is

to MSAccess.exe. What exactly does this reference mean when there are multiple versions of Access installed? Is it "the last one used" like the file
registration and if so, should any/all of them work the same way?


As I said, I don't have a copy of the code, so I don't know the
declarations. If all that's there is msaccess.exe, I'm not sure which one
it'll pick. I would assume that it looks in all of the normal places
(Windows, System, Current Directory, Path, etc) to find the file, but the
order in which it searches can vary from OS to OS.

Having said that, though, there are obviously ways of working with the
registry that don't involve msaccess.exe. I've used the code at
http://www.thescarms.com/vbasic/registry.asp myself several times.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Nov 13 '05 #4

P: n/a
"Rick Brandt" <ri*********@hotmail.com> wrote:
I am getting and setting registry values successfully with two functions
from
the Getz/Litwin/Gilbert book: adh_accRegGetVal and adh_accRegWriteVal.

I have two cases now where these do not work under Access 2002. There is
no error, the GetKey function based on adh_accRegGetVal simply returns a
zero length string every time.


I don't know the code. However I did have a problem recently where a person with
User permissions couldn't open a registry key. Turns out the problem was that my
code was, by default, attempting to open the key with read/write privileges. Which
Users aren't allowed to do in that area of the registry. Changing the open to read
made the reading of the registry work just fine.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #5

P: n/a
"Rick Brandt" <ri*********@hotmail.com> wrote in
news:2p************@uni-berlin.de:
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in
message
news:2Q*******************@news01.bloor.is.net.cab le.rogers.com...
I don't have copies of that code handy, but I can't imagine any
reason why having the 97 runtime would affect the use of an OS
API call. Are you sure the key actually exists on the machine(s)
in question?


Yeah, they're definitely there. My concern is that the API
reference is to MSAccess.exe. What exactly does this reference
mean when there are multiple versions of Access installed? Is it
"the last one used" like the file registration and if so, should
any/all of them work the same way?


There's only one registered MSAccess at any one time. If you use
both A97 and a later version of Access and you've not neutered the
relevant *.srg files (instructions on MichKa's website,
http://trigeminal.com), then the registration of the handler for
Access files will repeatedly switch back and forth. If you *have*
neutered the A97 *.srg files, the default association will be with
your later version of Access.

So, you really can't use that as the basis for knowing which version
of Access to use.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #6

P: n/a
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:Xn**********************************@24.168.1 28.86...
"Rick Brandt" <ri*********@hotmail.com> wrote in
news:2p************@uni-berlin.de:

There's only one registered MSAccess at any one time. If you use
both A97 and a later version of Access and you've not neutered the
relevant *.srg files (instructions on MichKa's website,
http://trigeminal.com), then the registration of the handler for
Access files will repeatedly switch back and forth. If you *have*
neutered the A97 *.srg files, the default association will be with
your later version of Access.

So, you really can't use that as the basis for knowing which version
of Access to use.


I guess that brings me back to the original question. If the API reference
is...

Declare Function adh_accRegGetVal Lib "msaccess.exe" Alias "#70" (ByVal
hkeyRoot As Long, ByVal strSubKey As String, ByVal strValName As String,
lpData As Any, ByVal lngMaxLen As Long) As Long

....should it make any difference which "msaccess.exe" is being referenced?
Shouldn't *any* of them work the same regarding the adh_accRegGetVal
function? Again, on my PC I have both A97 and A2K and I can switch between
those all I want and the function works just fine.

I guess I need to see if I can find a PC that has Access 2002 *only* and
see if the function works there. I really haven't determined that having
more than one version is related to the problem at all and frankly I
suspect that it is not.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.