Solved Join 2 Queries Together (1 Viewer)

dawsonrhodes

Member
Local time
Today, 17:53
Joined
Mar 8, 2020
Messages
85
Hey all,

So I have two tables, tblMultipleTransactionLogs, and tblReceiptofFunds - they are both two types of transactions we do, therefore stored and normalized. The common field among them is the [Patron], which is a number field related to [tblPatrons.PatronID].

Both have some unique collums, but I need to combine them into a query to display later on as a datasheet subform.

They both have ID numbers, (RoFID and MTLID), my though originally was to have another table called tblTransactions, where they would both go, and then I could relate back to them using a simple "[TransactionID]", but I forget why I didn't do that.

So I'm looking for some guidance on how to proceed, as I was to combine the data on one query, each on separate rows, as I have got this to work but what it does is it will fill in any records that are MTLs, and any RoFs on the same row, if Patron matches. In addition, as I mentioned, I'd like to consolidate the ID's to one [TransactionID].

Any advice? Thanks!
 

dawsonrhodes

Member
Local time
Today, 17:53
Joined
Mar 8, 2020
Messages
85
Code:
SELECT qryAllTransactionsMTLSide.* FROM qryAllTransactionsMTLSide
UNION ALL SELECT qryAllTransactionsRoFSide.* FROM qryAllTransactionsRoFSide;

Worked for my first issue, now need to join ID's, and I forgot to mention I need to have a field that displays the field [MTLDateCompleted] if [RoFDateCompleted] is null, and vice versa to have a TransactionDate field expression.,
 

dawsonrhodes

Member
Local time
Today, 17:53
Joined
Mar 8, 2020
Messages
85
TransactionID: [RoFID] & "" & [MTLID] works for the combination issue as one is always blank,
 

Users who are viewing this thread

Top Bottom