hunterfan48
Registered User.
- Local time
- Yesterday, 18:40
- Joined
- Aug 17, 2008
- Messages
- 436
UPDATE: I think this is working now. I'm sorry for the confusion! Can I only make changes to his query in SQL view?? I'd like to add more fields to show up from my inventory table.
ok...I got it now. I apologize for my mistake. I had my field names entered wrong. transactionID is actually transaction ID and cardID is actually just ID.
I know...bad naming and I need to fix that. But, now atleast this query runs. However, it only returns 1,094 cards. I want it to return all possible cards which would be 3,106. And it should actually be more because if a card has both a buying and selling transaction, then it should repeat that card ID in this query right??
Thanks
ok...I got it now. I apologize for my mistake. I had my field names entered wrong. transactionID is actually transaction ID and cardID is actually just ID.
I know...bad naming and I need to fix that. But, now atleast this query runs. However, it only returns 1,094 cards. I want it to return all possible cards which would be 3,106. And it should actually be more because if a card has both a buying and selling transaction, then it should repeat that card ID in this query right??
Thanks
In total agreement with all that has been said by all those that are trying to help.
Now coming to what you want & perhaps get over with, just check if below gives some guidelines :
tblTransactions
TransactionID - PK
CustomerID
Buy/Sell
tblInventory
CardID - PK
BuyingTransactionID
SellingTransactionID
Main Form based on tblTransactions
frmtblTransactions
Query for sub-form
qryAllCardsAllTransactionsID
Code:SELECT tblTransactions.TransactionID, tblTransactions.[Buy/Sell], tblInventory.BuyingTransactionID, tblInventory.SellingTransactionID, tblInventory.CardID FROM tblTransactions INNER JOIN tblInventory ON (tblTransactions.TransactionID=tblInventory.SellingTransactionID) Or (tblTransactions.TransactionID=tblInventory.BuyingTransactionID);
Make a sub-form frmqryAllCardsAllTransactionsID based on above query.
Incorporate it in the Main Form tblTransactions
where the field TransactionID from the Main Form is linked to the TransactionID field in sub-form.
Thanks
Last edited: