A DB for "free trials etc" blocking on date basis

Mike375

Registered User.
Local time
Today, 09:41
Joined
Aug 28, 2008
Messages
2,548
Someone might find this of use or improve it or show me how to do it the same for Excel BUT in particular see if they can get around it.

Open Form1 to commence. In the unbound text box [abc] the cut off date is entered like a macro on the OnClicke line. I am entering as the date x 86400 and in the example it is set for 30/12/08. For unbound textbox [xyz] the current date or date of delivery X 86400 is entered on the OnClick line. It must be entered a number because an entry like 20/12/2008 on the Event line is not read as a date.

The code sets the value of the line of OnClick for [xyz] and sets it to current date X 86400. Thus [xyz] eventually has the same value as [abc] and "days left" is 0. Changing the computer date back will not work.

The only way I can see to get around it (hence I am asking others if I missed something) is to not allow the computer date equal the pre set date in [abc] while running the code. Obviously the code is set to run everytime the DB being supplied is used.

The table is there because I that was the only way I could get IF Then ENF IF to work. A macro was OK using the value on the OnClick line or that value transferred to an unbound textbox. But the table should not cause a problem since if someone makes an entry it is wiped clean by the code and if they delete the table then nothing will work.

I also made another one (which is what I will mainly use) that works on blocking after a number of times. That was easy as it just sets the value on the line for OnClick to itseld +1 and with a 0 entered to start. An unbound text box reads the value etc

Using the Event property line to store the values was the only way I could think of doing in a way so that no one could get to it.
 

Attachments

Users who are viewing this thread

Back
Top Bottom