query on master/detail form's current record

I have a master/detail form and both tables have an amount field.  I want to
make sure the detail amounts equal to the related master amount. I want to
use a TQuery and place the result in a DBEdit control on the form.
Q1:  What is the SQL to place in the TQuery?
Q2:  How do I ensure the DBNavigator Post event or the form's close event
cant happen if the TQuery result is not $0.00?

Thanks
Ross