I am trying to limit the number of times that my database can be accessed. I plan to distribute it and would like to apply a trial period of 20 uses. At that point the user would be locked out until he/she has entered a password. Any help appreciated.
on the loading check wich users connected with Currentuser()
and write in the table the count ...
if the counts = the number you want then just close the application with a message
Thanks for the response, DreamWalker. I'm in a bit over my head here. It's probably simple for you all. Could you be a little clearer. This database is for home use, not on a network, so I don't believe that I would need to check for current user. I have some idea as to how to do this. The startup form on the db has two command buttons, one to continue in to the main menu (similar to the switchboard), and the other command button takes the user to the registeration form. Therefore, I could make a table to count how many times the user has clicked on the command button to go on into the main menu and when he reaches the limit, disable that button, bring up a message explaining that the trial period has expired, and the only two options that the user will have is to click on the register button or quit using the db. The one thing that I am not sure how to do is "write in the table the count". Would you please explain further?
To elaborate on Dreamwalker's idea, create a small table with one field...I called my test tblCount and the field EntryCount. Now, I went a different way. I went into the table and set the one record there to 20. I then created a text box on the form that is bound to tblCount.EntryCount (CountrolSource = tblCount![EntryCount]. I set the Enabled property of this box to No. Then, every time the continue button is pressed, but after you open the main menu, simply do:
Me![EntryCountBox] = Me![EntryCountBox] - 1
By using this method, you check for the box to be zero before you open the main menu. And you set an OnOpen preperty of the form to check for this box....if 0, then disable the continue button.
One benefit of using the count down like this is you can still display the box (remeber it is disabled!!! no user intervention but it can be seen) and let the user know how many times they have left to enter the program.
Hope I am clear enough. If you need more, please let me know. "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." Albert Einstein.
Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@citi.com
I have a small test database that has all the above done for you. I will gladly send it to you. Just give me your e-mail address.... "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." Albert Einstein.
Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@citi.com
Using a table will work fine, The way the link describes uses code and database properties so no one can manipulate the table that you use to keep track of the uses in.
If you have any questions let me know.
hth Dave
ToeShot@Hotmail.com
Today Is Tomorrows Yesterday. So Why Wait
This is waht iam trying to do with a random number, so access generates a rnd number and access what look up the answer e.g entry = rnd + 5 * 3 /2 or a admin password.
as the people before me create a table, i created a marco that runs once the startup forms loads and +1 to use count if use count is over ? then it disables the controls.
let me know whitch part you are stuck on and i will send what i have done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.