This topic is locked

Add a value into a not used field in any form

6/4/2007 2:57:57 PM
ASPRunnerPro General questions
I
igiacchi author

Dear Sirs,

I have a table with 4 field that are not used in any forms, but are used they are used in order to control who and when it has modified the table.

The field are for any tables the following:

For example the table Article have the following field:
A_IDUTE (this field identifies the customer who has inserted the record)

A_DATEINS (this field identifies the date who has inserted the record )

A_IDUTEM (this field identifies the customer who has modified the record)

A_DATEMOD (this field identifies the customer who has modified the record the last time)
This for every table of the database.

But if I don't display the record I cannot make any field modification.

I have already see all record in the forums and I have tried any similar solution but without any result.

You have a suggestion give give to me?

The Best Regards
And, my compliments for the fantastic product that you have produced.

F
funklet 6/5/2007

Ivano,
If I have read this correctly then what you need to do is as follows.
You need to first make sure the fields are in the select query (they will be if you have not modified the SQL query)

Then make sure they are unchecked for the pages that are used in the project so that they do not appear on any pages.

You need to add a BeforeAdd and BeforeEdit event to each Edit and Add Page.
The code of which will go something like this:
[codebox]

Function BeforeAdd

dict("A_DATEINS") = Now()

dict("A_IDUTE") = Session("UserID")

BeforeAdd = True

End Function[/codebox]

[codebox]

Function BeforeEdit(dict, where)

dict("A_IDATEMOD") = Now()

dict("A_IDUTEM") = Session("UserID")

BeforeEdit = True

End Function[/codebox]
I hope this is of help.

I
igiacchi author 6/5/2007

funklet THE BEST

I will construct one statue in your honor.

Many Many Many Thanks for your help.
Ivano