How can i write SQL inside the Client event

I have the master detailed form that i need to get the prices textfield autopopulated upon selecting the product name. Here is the screenshot

Use the “Auto Complete Data Source”