This topic is locked

Update field (write over) in another table

7/2/2009 3:30:40 PM
ASPRunnerPro General questions
C
crisstyd author

I searched the board for an answer, but I am stumped. I tried using the events, with no luck. Here is my issue:
I have a sign up form for two groups, one requests help, the other signs up to work.
Then I have a form that combines the two groups and allows me to "match" them up. Basically here is the structure:
_REQUESTTABLE

ID1

Name1

Date
_SIGNUPTABLE

ID2

Name2

Last_Date <-------this prefills from the DATE under ID1 (so it shows that Name2 worked for Name1 on a specific Date)
I need to pass the LAST_DATE to another table and update the record for Name2 (same field name). I need to continually update this field to always show the LAST_DATE a person worked.
Any suggestions or help extremely appreciated!!

Thanks

J
Jane 7/3/2009

Hi,
you can select values from SIGNUP_TABLE table in the Before process event on the Events tab and save it in the session variables.

Here is a sample:

str = "select Name2,Last_Date from SIGNUP_TABLE"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

Session("Name2") = rstmp("Name2")

Session("Last_Date") = rstmp("Last_Date")

rstmp.close

set rstmp=nothing



The use these variables as default values on the "Edit as" settings dialog on the Visual Editor tab.

C
crisstyd author 7/3/2009

Hi,

you can select values from SIGNUP_TABLE table in the Before process event on the Events tab and save it in the session variables.

Here is a sample:
The use these variables as default values on the "Edit as" settings dialog on the Visual Editor tab.


Jane..Thanks
I tried what you suggested, but it gives me an error. Could it be because there would be multiple listings for each NAME on the SIGN_UP table? How can I work around this? Is there a way to select the most recent SIGN_UP date?

J
Jane 7/6/2009

I recommend you to publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.