I need a little more information about what you are trying to do, but there are several ways to do what you ask. One is through the use of a subquery in a section (header, detail section, etc) of the form.
In the following example I have a line in a table that displays firstname and lastname from the main query and you might see that [that] in the where clause is a field returned from the main query of the form.
<td><td>[firstname]</td><td> [lastname]</td></tr>
{subquery, query="Select something from somewhere where this = [that] and whatchamacallit is null ",
format="<tr><td></td><td colspan=2 style='font-family: arial; font-size: 11px; font-weight: normal; background: AliceBlue; '>[something]</td>
<td colspan=2 style='font-family: arial; font-size: 11px; font-weight: normal; background: AliceBlue; '> [cdob]</td></tr>",,,,UseCache="false"
}
I hope you find this usefull. If you can share more details about what you are trying to do perhaps I can be more helpful.