473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hiding a table using VB. Also Registry entries

RWC
Hi!

I'm having a problem in A2K2. This should be simple, but I can't really
figure it out. First problem, I'm trying to set the property of a table,
via Vb to hidden, and I aslo would like to update the Description as well.
For some reason I can't seem to find any reference to doing this in the
online help.

Also, second part; I would like to find out more about reading, adding and
editing a registry entry via Access / VB. Although I haven't exhausted the
online help or knowledge base on this one yet, any help in directing me to a
resource would be great.

Thanks!
RWC.
Nov 12 '05 #1
5 3285
rkc

"RWC" <he********@shaw.ca> wrote in message
news:fB69b.4918$AD1.340@pd7tw2no...
Hi!

I'm having a problem in A2K2. This should be simple, but I can't really
figure it out. First problem, I'm trying to set the property of a table,
via Vb to hidden, and I aslo would like to update the Description as well.
For some reason I can't seem to find any reference to doing this in the
online help.

Also, second part; I would like to find out more about reading, adding and
editing a registry entry via Access / VB. Although I haven't exhausted the online help or knowledge base on this one yet, any help in directing me to a resource would be great.


Never wanted to hide a table via code so I can't answer that one.

An example of retuning a table's Description property follows. The error
handling is necessary because if the description hasn't been set the
property doesn't exist.

<code>
Function TableDescription(tableName As String) As String
On Error GoTo errHandler

TableDescription =
CurrentDb.TableDefs(tableName).Properties("Descrip tion")
Exit Function

errHandler:
TableDescription = ""

End Function
</code>

There are VBA methods to read and write to the registry. Look for
DeleteSetting, GetAllSettings, GetSetting and SaveSetting.

There are also a dozen or so Windows API functions that deal with
the registry. I'm sure they are documented on msdn.microsoft.com.


Nov 12 '05 #2
TC

"RWC" <he********@shaw.ca> wrote in message
news:fB69b.4918$AD1.340@pd7tw2no...
Hi!

I'm having a problem in A2K2. This should be simple, but I can't really
figure it out. First problem, I'm trying to set the property of a table,
via Vb to hidden, and I aslo would like to update the Description as well.
For some reason I can't seem to find any reference to doing this in the
online help.

Also, second part; I would like to find out more about reading, adding and
editing a registry entry via Access / VB. Although I haven't exhausted the online help or knowledge base on this one yet, any help in directing me to a resource would be great.


As the other respondent said, VBA gives you GetSetting, SaveSetting & so on.
These are easy to use, BUT, they put your keys at a fixed location in the
registry. I can't remember where that is (see online help), but I *do*
remember that it is not where I wanted it! So you might not want to use
those functions. (Geez msoft, how hard would it have been to have the extra
parameter! :-(

Try googling on "win32 registry vba" - there's sure to be tons around. But
here's a tip: carefully check the access level that you request on the
registry. In win95 (98? 9x?) it was not checked, & you could get away with
anything. But in winXP etc. it is checked, so code that used to run before,
might start getting permission errors. If you only want to read, just
request read - no more - & so on.

HTH,
TC

Nov 12 '05 #3
rkc

"TC" <a@b.c.d> wrote in message news:1063618288.584568@teuthos...
As the other respondent said, VBA gives you GetSetting, SaveSetting & so on. These are easy to use, BUT, they put your keys at a fixed location in the
registry. I can't remember where that is (see online help), but I *do*
remember that it is not where I wanted it! So you might not want to use
those functions. (Geez msoft, how hard would it have been to have the extra parameter! :-(


I'm not sure it's in the help file, but according to VBA & VBA in a Nutshell
SaveSetting writes to a subkey of

KEY_CURRENT_USER\Software\VB and VBA Program Settings.

Nov 12 '05 #4
TC

"rkc" <rk*@yabba.dabba.do.rochester.rr.com> wrote in message
news:oI*******************@twister.nyroc.rr.com...

"TC" <a@b.c.d> wrote in message news:1063618288.584568@teuthos...
As the other respondent said, VBA gives you GetSetting, SaveSetting & so on.
These are easy to use, BUT, they put your keys at a fixed location in the registry. I can't remember where that is (see online help), but I *do*
remember that it is not where I wanted it! So you might not want to use
those functions. (Geez msoft, how hard would it have been to have the

extra
parameter! :-(


I'm not sure it's in the help file, but according to VBA & VBA in a

Nutshell SaveSetting writes to a subkey of

KEY_CURRENT_USER\Software\VB and VBA Program Settings.


Yes, I remember now. And that's why I don't like it! If you are installing
something that is common to the machine as a whole - not specific to the
current user - you want it to go in HKEY_LOCAL_MACHINE, and this is not
possible when using those functions.

TC

Nov 12 '05 #5
TC

"Max" <ma*********@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...

(snip)
If you want to write and read other registry settings try using win 32
API function like RegCreateKeyEx, RegOpenKeyEx etc.

Yep, I already do that :-)

But thanks for the advice anyway.

TC

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Picho | last post by:
Hi all, Lets say I have a "secret" I wish to "hide", lets say a database password. For the more detailed problem, a web application/service that uses a connection string. all the solutions I...
9
by: Dr. Know | last post by:
Greetings, I am running IIS on W2kServer and am trying to use ASP with some legacy X-Base tables. I cannot get the provider to connect. Relevant code is: strProvider =...
3
by: abcd | last post by:
I want to get the list of data sources on the server machine using C# and ASP.NET any clues how to get that...I have done this using VB using SQLDataSources function from ODBC32.dll thanks
21
by: Kevin Swanson | last post by:
I'm attempting some remote registry manipulation via C#. I've written a test app to simply grab a specified key from a specified hive on a specified machine. The call to OpenSubKey is throwing...
2
by: Shiraz | last post by:
Hi I just made an installer for an application that uses two external COM dlls. On the surface, everything seems to be running smoothly and the the application runs without any errors. However,...
0
by: Luther Hert | last post by:
I solved my problem, but I am not sure whether or not I understand how I arrived at the solution. I leraned about and checked: IIS> creating virtual directories> configuring web extensions >...
3
by: penguin732901 | last post by:
What do experienced programmers find the most efficient way to handle user settings. Currently I have 4 tables which allow various clients to customize my program to work for them,...
8
by: MLH | last post by:
I'm using Albert Kallall's code to set printers in A97. I find that on some machines, the code locks up and on others, it does not. I would like to overcome this and was wondering about the...
4
by: Bob Alston | last post by:
Can anyone tell me what are the files required for Replication manager and registry entries required? I think I read that there are 7 files and 3 registry entries but no specifics. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.