This topic is locked

updating field in another table

11/23/2008 2:48:10 AM
ASPRunnerPro General questions
G
guroos author

In the 'beforerecordupdated' event I found the code for inserting a new record but what if I just want to update a field in another table?
For example:

2 tables 'applicant' and 'stands'

When the user selects 'standnumber' in the 'applicant' edit form ('standnumber' is lookup the 'stands' table)

then that stands 'allocated' field should be set to 'yes' thus stopping it from appearing on the drop down next time.

J
Jane 11/24/2008

Hi,
here is a sample:

dal.AnotherTable.Value("allocated")="yes"

dal.AnotherTable.Param("standnumber")=dict("standnumber")

dal.AnotherTable.Update()

G
guroos author 11/24/2008

Hi,

here is a sample:


Thanks for your response. I tried the following but it didn't work:

dal.t_stands.Value("StandAllocated")="yes"

dal.t_stands.Param("standnumber")=dict("standnumber")

dal.t_stands.Update()
I placed it in the event 'after record updated' for the t_applications 'add' page

J
Jane 11/25/2008

Hi,
It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.