Re: Returning too many lines

Tech-Archive recommends: Fix windows errors by optimizing your registry



Your problem stems from incorrectly designed tables. Recommended:
TblTrader
TraderID
TraderFirstName
TraderLastName
<<Other trader contact fields>>

TblExchange
ExchangeID
ExchangeName

TblStock
StockID
StockName
StockSymbol

TblStockTradedOnExchange
StockTradedOnExchangeID
StockID
ExchangeID

TblStockTrade
StockTradeID
TraderID
StockTradedOnExchangeID
TradeDate
SharesTraded

To get the display you want, you need to create a form/subform. The main
form would be based on TblStock. For the subform you need to create a query
that includes TblTrader, TblStock, TblExchange and
TblStockTradedOnExchange. This query would have fields for StockID, trader
name, exchange, trade date and shares traded.

PC Data***
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@xxxxxxxxxxxxxxx




"TraderAnalysis" <TraderAnalysis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BC0BC6FE-DE9F-4B39-AEAA-202A15744729@xxxxxxxxxxxxxxxx
I have 2 tables that I have linked in a query by stock. I have then
created
5 columns by Exchange where the stock is traded (Table 1) and at by
looking
up who trades it (Table 2). I used if statements to get the results (if a
stock trades here, show me the trader). All works very well but when I
run
the query, there is multiple lines for each stock. So for example, 3
lines
of stock ABC has trader1 trading at Exchange1, trader2 at Exchange2 and
trader3 at Exchange 6 and all are on different lines. How can I get it to
return one line by stock and each trader across the one line? FYI - only
one
trader trades a stock by Exchange so it's not as if ABC is traded by 4
traders at Exchange1.

Thanks



.


Quantcast