Load the Database If a Registry Key its allowed

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20780133.html

that link should provide you some example. anyway, my thought of that only is that, where is that registry located? what if someone knows how to access that registry and alter that registry. I was thinking maybe that, since that code doesnt specify where in the registry will that be saved, then, it is probable that SAVESETTING AND GETSETTINGS would be in one specific location only in the registry, so if someone knows where is that settings, then, it can be alter, whereas if I make my own registry, then it would be more harder to find. That is only what I've thought so far.

Marianne Thanks for the link but I dont have account to review this link :(
 
you dont need account to view that. scroll down and you will see the example.

you can either use the OnLoad or OnOpen event of your startup form.

moreover, if you are going to use registry strings, maybe I can advice you to use REG_SZ for text values because REG_DWORD is for values 1 and 0 pertains to yes or no.
 
you dont need account to view that. scroll down and you will see the example.

you can either use the OnLoad or OnOpen event of your startup form.

moreover, if you are going to use registry strings, maybe I can advice you to use REG_SZ for text values because REG_DWORD is for values 1 and 0 pertains to yes or no.

Sorry but I dont see anithing on that link I just see a Accepted solution and advertisement. See the attachment
 

Attachments

  • NoLink.JPG
    NoLink.JPG
    91.9 KB · Views: 117
Im DONE
I dont find the solution... Or I Dont Understand how to get the solution
Thanks for all your help.
 
http://www.experts-exchange.com/M_828266.html


The syntax should be something like:

SaveSetting "YourApplicationName","Settings","LastShutdown",now()

The First parameter describes your application name.
The second the general nature/group of the information you're going to save.
The third parameter describes specifically the peice of information that is going to be saved
The final parameter is the value of the information to be saved.

Thus the above example will store the LastShutdown time of your application, inside the Settings group.
It will create the following key in your registry.
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\YourApplicationName\Settings\LastShutDown = "28/10/03 09:37:40"

This information can then be read back using the GetSetting function

Dim strDate as String
Dim dtmDate As Date

strDate = GetSetting("YourApplicationName","Settings","LastShutdown")
'strDate now holds "28/10/03 09:37:40"
'Not GetSetting always returns a string value

dtmDate=CDate(strDate) 'Convert the string date back to a real date.


The GetSetting function also has a fourth parameter call Default. If this is specified then the value in Default is used if an entry in the registry cannot be found.
ie.
strDate = GetSetting("YourApplicationName","Settings","LastStartUp",now())

Note we are looking for the LastStartUp value, as we haven't created this registry entry yet (using SaveSetting) it will return the current Date and Time.

Accepted Solution
 
as you can see heman85, if I know that your application is ms access and there is this restriction and I know how to go about the registry and have researched where to find the registry key, I would definitely have altered that key found on HKEY_CURRENT_USER\Software\VB and VBA Program Settings registry entry.

that is why i preferred making my own registry string.
 
as you can see heman85, if I know that your application is ms access and there is this restriction and I know how to go about the registry and have researched where to find the registry key, I would definitely have altered that key found on HKEY_CURRENT_USER\Software\VB and VBA Program Settings registry entry.

that is why i preferred making my own registry string.
Thanks for your help Marianne and for your attention on this postbut I dont know Where or how create this
I dont know Ifthis is a module or if this we need to insert on event procedure on what function.
I seeth code was youpost here and I read detailed and I dont undestand the code.
Im not a programmer I just want to prevent copy the foldr of my database to another computer. If you have some other way to do this more easy let me know THANKS
 
well I cannot give you the code to prevent copy of your folder of your database to another computer, what matters most is to prevent your application not to be used in another computer wherein your registry that you create does not exist.

here is my code compilation. Hope you study them and learn from it.
Moreover, the code is not under a module but if you wish, you may put it in a module.
 

Attachments

I am not a programmer too heman85 but I go deep to study every example that I encounter.
 

Users who are viewing this thread

Back
Top Bottom