Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with modifing widoez registry and compacting back ends

Status
Not open for further replies.

Taha60

Technical User
Jun 21, 2002
54
0
0
CA
Hello...

Two questions please....I would be very grateful for ze answers :)

1. I would like to ensure that everytime someone loads my database that the option "Windows in taskbar" from Tools-->options-->View Tab is unchecked... For access xp or 2k you can modify the following registry key.

My Computer\Hkey_Current_User\Software\Microsoft\Office\10.0\Access\Settings\ShowWindowsIntaskBar

Can some one please give me a sample database or code that helps me change that to 0 instead of 1 (this is by the way a HEX value) and note the 10.0 stands for access XP and i will also have to check for access 2k which is 9.0

2. I would like to compact the backend from a front end using a simple button ... Note that everytime someone is on a front end the <DATABASE BACK END FILE NAME>.ldb file is there indicating that someone is using the database to access data. Can anyone suggest an automated way ie. by clicking on a button how I can compact the database.... again sample code will be greatly appreciated...


Thanks ... and Have a nice day :) Taha
thamiral@uwo.ca
 
I run access 2k on windows 2k, and i use the following code to do what it is you are asking...

Application.SetOption &quot;ShowWindowsInTaskBar&quot;, False
' turn the windows in taskbar to off...

DoCmd.RunCommand acCmdAppMaximize
' maximizes the access window...

--James junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Thanks for that one ... where do u recommend to put it? Taha
thamiral@uwo.ca
 
i have a splash screen that loades when the database is first opened, i have that in the on open of that form...

also, i forgot about your other question... compacting the database is typicly not a good thing to automate... i've tought about it in the past, but i've alwas found that it causes more problems then any thing...

--James junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Thanks for the input.... I just have one prob. i shall not be able to maintain the database after I am gone which is within a month ... then who will compact the back end without making a mess of stuff....

Thanks ...
Taha
thamiral@uwo.ca
 
hmm... i don't know... the problem is that if it's multi user, then no users can be in when the database get's compacted... if it's a single user then i would make a button on the menu to do it... just a couple of things i would note...

--James junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Disconnecting users should not be a prob. since I can add a value in my &quot;configuration table&quot; with either a false or true. My forms can be set to check for the value and display a msg and quit forcefully if need be. Even if there was ONLY one user, My admin menu does have a lock on one of the tables (all records) I will have to know how to disengage the lock using code ... I would really appreciate it if you could tell me how I disengage a lock on table... then after that variable is set no one can log in ... and after disengaging the lock i can open and compact using code....

Just my 2 cents on this issue ... Lets hope someone can help me on this issue

Thanks
Taha
thamiral@uwo.ca
 
Have a look at my FAQ: faq705-1955
It shows how I compact my database automatically. It's not exactly what you want, but it may be able to help you get started. You will need to set the file running, kick everyone out & make it so they can't log into the back end again. The best way I found to make sure people didn't log into a file again was to have a seperate file (either a text file or another database) that is checked to see if the database was &quot;open&quot;.
My code is set up for A97 at the moment, but changing DAO.DBEngine.35 to DAO.DBEngine.36 will make it work on A2k & A2k2.


Let me know if this helps.

Ben ----------------------------------
Ben O'Hara
Home: bpo@RobotParade.co.uk
Work: bo104@westyorkshire.pnn.police.uk
Web: ----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top