The Autonumber field is called TransactId
The main field = Transaction
If the TransactId = 1 = Sale
If Transactid = 2 = Purchase
In a query called qryData where i have the client and quantity and transaction fields, i would like to have columns called Sale and Purchase with the quantity displayed depending whether the TransactId =1 or 2
Client TransactId Quantity Sales Purchase
Peter 1 10 10 0
John 2 20 0 20
In the query
Expand|Select|Wrap|Line Numbers
- Sales:IIf([transactid]="1",[Quantity],"0")