autofill from unbound textbox (1 Viewer)

saqassemi

Registered User.
Local time
Today, 00:48
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

  • SerialNumber.mdb
    324 KB · Views: 96

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:48
Joined
May 7, 2009
Messages
19,233
check Module1.
i have disabled the Opening form, instead run an Autoexec macro.
as per your request.
 

Attachments

  • SerialNumber.zip
    27.9 KB · Views: 63

saqassemi

Registered User.
Local time
Today, 00:48
Joined
Nov 11, 2017
Messages
37
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:48
Joined
May 7, 2009
Messages
19,233
if cpuid = "aa", change it. will i show warning or mainform after changing?
 

moke123

AWF VIP
Local time
Today, 03:48
Joined
Jan 11, 2013
Messages
3,916
try this one
 

Attachments

  • SerialNumber.zip
    21.2 KB · Views: 50

moke123

AWF VIP
Local time
Today, 03:48
Joined
Jan 11, 2013
Messages
3,916
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.
 

saqassemi

Registered User.
Local time
Today, 00:48
Joined
Nov 11, 2017
Messages
37
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:48
Joined
May 7, 2009
Messages
19,233
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.
 

saqassemi

Registered User.
Local time
Today, 00:48
Joined
Nov 11, 2017
Messages
37
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?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:48
Joined
May 7, 2009
Messages
19,233
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

  • Security.zip
    22.1 KB · Views: 67

saqassemi

Registered User.
Local time
Today, 00:48
Joined
Nov 11, 2017
Messages
37
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:48
Joined
May 7, 2009
Messages
19,233
Goodluck, and btw, the function also works on .accde.
 

moke123

AWF VIP
Local time
Today, 03:48
Joined
Jan 11, 2013
Messages
3,916
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

  • DB_PropertyDemo1.zip
    123.6 KB · Views: 52

saqassemi

Registered User.
Local time
Today, 00:48
Joined
Nov 11, 2017
Messages
37
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
 

moke123

AWF VIP
Local time
Today, 03:48
Joined
Jan 11, 2013
Messages
3,916
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.
 

isladogs

MVP / VIP
Local time
Today, 08:48
Joined
Jan 14, 2017
Messages
18,216
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

Top Bottom