Hello,
I want to populate a field from a different table based on the selection of another field. So I have the ResidentID and the ResidentName in a Residents table. I am inserting records for the Resident and I want to get the ResidentName from the Resident Table using the ResidentID when adding a record. Here is what I have tried but it is not working;
rsnew["ResidentName"] = ew_ExecuteScalar("SELECT * FROM Residents WHERE ResidentID = (Convert.ToInt32("rsnew["ResidentId"]")");
Can someone pleased tell me what is wrong with the code above. It would be greatly appreciated.
Thanks in advance,
JW