Access 2007

Posted on 2011-04-22
Last Modified: 2012-05-11
My OS is windows 7 and I am trying to build a small access app for a friend.  But I just want this app to be used only on one pc, which is the one he has at home.  Is there a way to tie in the code  the IP address of the pc, so that it will not be recycled.  thank u.
Question by:jegajothy
    LVL 20

    Expert Comment

    You could place a file (perhaps in the System 32 folder) that you specifically look for in order for the application to run.  Title it so it doesn't reflect your application.  For instance "x2gt.dll" or something.

    In the startup of the app, look for it.  If it doesn't exist, the program quits.

    function CheckForFile()
    dim verror as boolean
    dim f as long
    on error goto NoFile
    f = freefile
    open "YourPath and file name" for input as #f.
    if verror = true then
        '--- can't open the file - it doesn't exist --
        msgbox "Illegal copy",vbcritical
        on error resume next
        close f
    end if

    '---- to get here meant the file exists and all is good -----
    close f

    exit function

     verror = true
     resume next

    end Function

    Scott C
    LVL 84
    I have to ask - if this is for a friend, why would you care if it's used on other machines? Just curious, really ...
    LVL 44

    Expert Comment

    As you have Acess 2007, you have access to Extensions from which you can build a RunTime app and password protect it.  Tying it to the IP address is not a good idea.  What if he moves?

    Author Comment

    In response to LSMConsulting, as it is going to take me lots of time and energy and I have to build it from scratch and since he is running a successful home business and the ability to pay but as usual with humans, they will try to short change u.  He wants me to build it for 4 pcs,but knowing him he will deploy to other pcs when he expands.  Just do not want to be a made a fool.   Thus, the idea to make sure that I hard code the IP address for the 4 pcs.  Any other ideas will be welcome.
    LVL 9

    Accepted Solution

    Is your "friend" paying you for your time?  Why not let him move it to other PCs later?  It's the same effort for you either way, right?

    If I paid for your development time and after receiving your software found out that you had restricted it to 4 particular PCs, preventing me from updgrading them, moving the software to other hardware, etc., I would be very upset.  Especially if you were no longer available to change the code for me.

    We've built hundreds of applications for clients.  We bill for our time and we get paid.  Our clients get the source code.  We don't lock it down with draconian measures.

    When our clients are successful and need to use our software even more, if they're happy they come back to us for enhancements.  And happy customers are referenceable customers.  Putting handcuffs on a customer tends to make them less happy.


    Author Comment

    In response to ArmenStein, I never thought to look at that way.  I was looking at the licenses we buy for our software, where it is for one user one pc.  And I will not be surprised if he resells my application to others, thus the reason to put handcuffs on him.
    LVL 84
    I agree 100% with Armen.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now