RE: Adding two datasources for different tables to same query object for a SysQueryForm
Can you show us your complete code? And if it's not visible in your code, please tell us what datasource exist in the query.
For example, I wonder why you search for a ProjPostedTransTable datasource if you've just created it.
If there is no other datasource for ProjPostedTransTable, then you can simply refer to qbdsProjPostedTrans variable. And you can throw away all the code dealing with ranges, because there are no ranges to iterate. You would have to add some first, which you didn't. If you want to add some ranges, you'll have to fix your logic.
Or your query already contains another DS for ProjPostedTransTable and your code may be filtering the other DS (which you didn't even mention so far).