This topic is locked

project add - edit function

6/13/2006 2:14:52 AM
ASPRunnerPro General questions
virtualbox author

Sergey,
My project is so composed
1° field - Surname Name:

2° field - Date entry: (function VBScript )

3° field - Time entry: (function VBScript [color=#FF0000]Time () )

4° field - Date exit:

5° field - Time exit:
the first 3 information I insert you with the function " add new"

the last 2 insert you with the function "edit"
Is possible that the system automatically adjourns 4° and 5° field with the function only "edit":
4° field - date ()

5° field - time ()
I have used a translator apologize for possible errors <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=2767&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />
Giampaolo (Italy) <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=2767&image=2&table=forumtopics' class='bbc_emoticon' alt=':D' />

J
Jane 6/13/2006

Giampaolo,
you can uncheck ADD option for the Date exit and Time exit fields on the Choose fields tab.

virtualbox author 6/13/2006

I have followed Your suggestions but the records that they is not automatically adjourned
Name - list ok - add ok - edit ok

date in - list ok - add ok (date ())

time in - list ok - add ok (time ())
date out - list ok - edit ok (date ())

time out - list ok - edit ok (time ())
Grazie <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=9043&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
Giampaolo

virtualbox author 6/14/2006

In the passage 7 of 12, the commands VBScripts work only you add record?
Thanks for an answer

J
Jane 6/14/2006

Giampaolo,
I'm really confused with your message.
Do you use VBSCript functions as default values on the Edit format dialog on the Formatting tab (step 7)?
You can set VBScript fucntions (Now and Date) as default values for the ADD page only.

You can use VBScript functions as default values on the EDIT page using events.
For this proceed to the Events tab (step 11), select Before record updated event and add following code in it:

Function BeforeEdit(dict, where)

dict("dateexit") = Date()

dict("timeexit") = Time()

BeforeEdit = True
End Function

virtualbox author 6/14/2006

Your suggestion works <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=9095&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />

You a magician!

I have spent well my money!
A detail, the same function can be used

Table events -> edit page -> edit page: OnLoad ?
Thanks

Best regards

J
Jane 6/15/2006

Giampaolo,
you can't use EditOnLoad event because dict variable is in the BeforeEdit event only.