autofill from unbound textbox

saqassemi

Registered User.
Local time
Today, 14:59
Joined
Nov 11, 2017
Messages
37
Hi, this is an MS access file that shows pc information, I want after showing the pc information, automatic save cpu serial number in the table if it is empty. If it is not empty check both information cpu s/n and the table value, if they are equal open mainform if not equal open warningform

Note: this works like a lock for my file, when I open in a pc for first time it auto save the cpu s/n to the table. So when the user copy the file to other pcs it shows warning.

if is it possible summrize the codes to show only cpu s/n not all pc information too.

Thanks for your help
 

Attachments

check Module1.
i have disabled the Opening form, instead run an Autoexec macro.
as per your request.
 

Attachments

thanks a lot, but it add a new record. is it possible if the record is empty or is filled with "aa" then change it with cpu s/n and if it is not "aa" check it's value with cpu s/n, if they are equal open mainform, if not open warning form.
 
if cpuid = "aa", change it. will i show warning or mainform after changing?
 
i'm assuming your using aa as a placeholder record but that is not necessary.
my example tests for a null field and enters the serial number on the first run.
it then does the comparison on subsequent runs.
 
if cpuid = "aa", change it. will i show warning or mainform after changing?

Note: this works like a lock for my file, when I open it in a pc for the first time it auto save the cpu s/n to a table (one record as a place holder). So when the user copy the file to other pcs the cpus s/n don't match and it shows warning.

thanks for your attention
 
There is much better way than saving to a table. Somebody knowledgeable can delete the record from your table. It is better to save it as property of the database.
 
There is much better way than saving to a table. Somebody knowledgeable can delete the record from your table. It is better to save it as property of the database.

Is it possible to delete a record from hidden table in an accde file?
 
es. Accde only disalloe changes to form, reports, module and table design. But they can delete the record. If they do that, they can run your db to their workstation

Here i made a demo, saving the serial as property of the database.
Run it to your computer then run it to other pc.

In the module, ResetComputerSerial function resets the serial.

No table is involved.
 

Attachments

es. Accde only disalloe changes to form, reports, module and table design. But they can delete the record. If they do that, they can run your db to their workstation

Here i made a demo, saving the serial as property of the database.
Run it to your computer then run it to other pc.

In the module, ResetComputerSerial function resets the serial.

No table is involved.

Thanks, It's all I want.
 
Goodluck, and btw, the function also works on .accde.
 
I never played around with the DB Properties but thanks to Arnel's suggestion I experimented and learned something new.:)
I figured I'd post my experiment to give you another perspective. there is an accdb and an accde in the zip.
 

Attachments

es. Accde only disalloe changes to form, reports, module and table design. But they can delete the record. If they do that, they can run your db to their workstation

Here i made a demo, saving the serial as property of the database.
Run it to your computer then run it to other pc.

In the module, ResetComputerSerial function resets the serial.

No table is involved.


Oh no, the properties is changeable by shift key or bypass. would you help me to prevent this file from bypassing. or is it better that the serial, save as a label in a form in place of changing properties.Thanks
 
the db i posted has a module to disable the bypass. It also has the right click menu disabled on the warning form which is modal.

be aware though that nothing is foolproof. these methods will probably only deter some people. If the really want to get in they will. I believe you are able to access a databases properties from a separate database so take it for what its worth.
 
Hi moke

Thanks for this - its another feature that I want to add to some of my own commercial databases. Until now that's not been an issue as all apps have been supplied with a site licence.

However, I'm moving away from schools' databases into more general business applications. For one of these (UK postal addresses), I intend to make it available in various versions and for different numbers of computers (e.g. 1, 2, 5, unlimited)

Your example should help me work out how to achieve this for several PCs using db properties rather than saving to tables.

Very wise to warn that no system of this kind is foolproof.
All any developer can do make it as hard as possible for software to be pirated.
 

Users who are viewing this thread

Back
Top Bottom