I can't really make heads or tails of how you might relate data in your two tables (They don't sound like two databases here. "database" is a much fuzzier term that can refer to multiple tables in multiple files...)
But I can suggest that you take a look at the scripted finds found here: Scripted Find Examples
Stored find criteria cannot evaluate expressions such as referring to the data in a field. These scripted find examples avoid that limitation by using set field steps instead fo stored find requests. You'll find that none of the examples specify any criteria inside the Enter Find mode or Perform find script steps. Not only does this allow you to use calculations to produce search criteria, the criteria are all immediately visible without having to open up another dialog to see them should you return to this script several months later and not remember what criteria is being used in the script.