Code Placement
Posted: Tue Mar 08, 2011 1:37 pm
Hi all , i have a form invoice which have the invoice (tra_number) field , i have a table called customer that contains customer_id, and i want when the invoice form load , depending on the tra_number being displayed on the form ,it goes to customer database and select the fields i need and display them
customer( customer_id ,cus_mobile,cus_phone)
transaction( transaction_id, tra_number,tra_customer_id)
i want when the form load, it automatically detects the current tra_number being displayed in a display component and then run the sql " select cus _phone,cus_mobile from customer inner join transaction on transaction.tra_customer_id = customer.customer_id where tra_number= " code being displayed in the component"
my problem is how to get the current id from the display on the current form and the use that value in an sql to be triggered in another display on the same form to display the sql results
i am including a screen shot
customer( customer_id ,cus_mobile,cus_phone)
transaction( transaction_id, tra_number,tra_customer_id)
i want when the form load, it automatically detects the current tra_number being displayed in a display component and then run the sql " select cus _phone,cus_mobile from customer inner join transaction on transaction.tra_customer_id = customer.customer_id where tra_number= " code being displayed in the component"
my problem is how to get the current id from the display on the current form and the use that value in an sql to be triggered in another display on the same form to display the sql results
i am including a screen shot