PDA

View Full Version : Auto updating date field


ABC123

Renae Rogers
03-28-2001, 06:56 PM
I would like to have a date field in my database that automatically updates to the current date when you make a change to a record - without having to physically enter the date field for it to change. Is this possible?

OR do you have to actually enter the field during your change in order for it to update? If so, how do I make it do this then?

Renae Rogers

Melvin Davidson
03-29-2001, 05:09 AM
Renae,

The best way is to edit the field rules for the database,
select events, Record events and attach a script to the record changed event that would update the date field with the value of DATE().

Your welcome :)
Melvin

Renae Rogers
03-29-2001, 07:03 PM
I've not done any scripting before so what exactly do I type in the script box?

Sorry to sound like a dummy!

Renae

CraigSchumacker
03-29-2001, 11:37 PM
Renae:
Open the database that contains the date field. Click on the field rules tab. Now click on the events tab and select record events as shown. Great, now select the 'changing the record' event from the drop-down list.
Type in, as shown:
databasename->datefieldname = date()
In my example, HDVISIT is the database name, and
visit_date is the field.
There's points if you can figure out what the HD
stands for!!!
Hopefully, the picture comes out OK! [;
Craig

Melvin Davidson
03-30-2001, 04:14 AM
Craig,

Since it was my suggestion, I want a chance at the points.
I'm guessing HD stands for Health Department. If I''m right, send me the points by email. :)

Melvin

CraigSchumacker
03-30-2001, 07:23 AM
Melvin:

Sorry, no points this round. Would you like to try for double jeopardy and earn twice as many points. Perhaps I could sell you a vowel?

I guess the reason I'm playing with this is, that you can never tell just how big the names are which are associated with using Alpha Software!

I find myself looking at every computer, whether at the insurance agent, or at Macy's, wondering if the database engine behind it is A4 or A5!

Anyway, It was a good guess, Health Department. They do make visits...

Craig

Renae Rogers
04-01-2001, 04:23 PM
ACE! It worked. Thanks guys for your help. I've been using Alpha for years but am a newcomer to the messageboard - now I could kick myself for not looking at it before.

HD - hhmmm? Health Department was a pretty good guess but I'll lock in Head of Department.

By the way, do you know if there's a way of seeing a trial version of the latest Alpha 5 package? Just looking at what's on the website, it looks very different to the version I'm on.

Cheers :)

Renae

CraigSchumacker
04-01-2001, 06:16 PM
Renae:

If you are just starting to use Xbasic, NOW is the time to convert over to A5V4.5!

A 30 trial version is available on WWW.ZDNET.COM:

http://www.zdnet.com/downloads/stories/info/0,,001G1G,.html

It is about 14 megabytes and will take a while to download (+/- 1 hour), unless you have a cable modem, DSL, etc...

Sorry, Head of Department is an incorrect answer.

Craig

PS Welcome to the board!

Melvin Davidson
04-02-2001, 05:34 AM
Renae,

Glad to help! Craig is right. Now is the time to upgrade to A5. I've enjoyed A5v1.02 for many years, but it took me a while to catch on to the v4.5 version. It should be easier for you, since you won't have to "unlearn" some things.

Good luck,
Melvin