Results 1 to 6 of 6
  1. #1
    erickemboi is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    73

    Code ms access database to be used for 15 days

    Kindly assist me with a vba code to make my ms access database to be trial version. When you check in it should say


    "THIS DEMO WILL STOP WORKING IN 15 DAY(S)"
    Thanks in advance.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    make a table to capture the dates used.
    when the record count hits 15 give the warning and end it.
    BUT you must create a locked up version .mde so it cant be hacked/re-written.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Unless you have a total lockdown on the db, including its tables, this is almost impossible, but I guess that depends on the sophistication of your target user. It's likely that I could expose which field I need to update, and then update the date you're using to calculate the 15 days. Or I could probably get by with back dating my Windows system date to get around your barrier.

    If you want to block most hacks, you'd probably have to write code to add a registry key and a key value. Even then, that will likely fail in a corporate setting where a user can use the db but isn't allowed to modify the registry. In that case, you'd need to use an installer that their IT department would trust.

    If you want to try something else, you could create and set a custom db property and distribute the db with it having some value such as zero. Then when it first runs, make the value a date value of Date + 15 and compare the property value each time it runs. On first run, the test would have to be IF property = 0 Then - not IF Date>property value because on first run, any date will be greater than 0.

    I confess I've never tried the latter but have used the registry method.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    erickemboi is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    73
    Assist me with registry method

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Are you usually so straight forward and demanding?
    Try Google.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Hipromark is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    Bogota, Colombia
    Posts
    15
    Quote Originally Posted by erickemboi View Post
    Assist me with registry method
    I have a VBA procedure that I use to protect my Access DBs in the way that you need, it is similar to the procedure that Micron already explained to you.

    Basically, what you need to do is assign a date value to a variable and then evaluate each connection, also you can add recognition for the Windows user so that way the user cannot use it on a different computer, you can use a hidden form to activate the procedure.

    However if you need further assistance you can send me a private message and I will try to help you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Read all source code from an access database.
    By beilstwh in forum Access
    Replies: 4
    Last Post: 01-16-2018, 06:52 AM
  2. Replies: 9
    Last Post: 03-07-2016, 04:17 PM
  3. Replies: 2
    Last Post: 04-10-2015, 03:51 AM
  4. How to code base on days and hours of shifts
    By boywonder381 in forum Programming
    Replies: 6
    Last Post: 09-23-2014, 01:54 PM
  5. Replies: 3
    Last Post: 04-05-2006, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums