J
|
Jane 2/2/2009 |
Mark, global $readonlyfields; $readonlyfields["FieldName"] = 11111; |
M
|
marke author 2/2/2009 |
Jane global $conn; |
M
|
marke author 2/3/2009 |
OK I tried some code I found on another forum response. This is the code I am using in a BeforeShowEdit event on the details table (the master table is tblsimulation - the key to the details table is idtblsimulation in the master table and simulationID in the details table) global $conn, $readonlyfields;
|
J
|
Jane 2/3/2009 |
Mark, global $conn, $readonlyfields,$strTableName; $i = 1; $sql = "SELECT * FROM tblsimulation WHERE idtblsimulation=".$_SESSION[$strTableName."_masterkey".$i]; $result = db_query($sql, $conn); $row = db_fetch_array($result); $readonlyfields["simulationID"] = $row["shortname"]; |
N
|
nitinjainDevClub member 2/3/2009 |
Jane That's looking promising - but I need to retrieve the required name from another table using the foreign key - which array is this information stored in. i.e I need to know what I can use for the value to retrieve the information from the other table - should $ABC below be $oldvalues, $values, $data or something else - I'm not sure which array is set with the edit page values at the time this event is triggered -------- example code ----------------------- global $conn;
|
M
|
marke author 2/3/2009 |
Thanks Jane - that works fine now |