473,408 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Display different records in a combox in a query under own heading

547 512MB
I have a table called Transactions
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
  1. Sales:IIf([transactid]="1",[Quantity],"0")
Do i use the iff function.I get #Error. Any suggestions?
Aug 24 '13 #1

✓ answered by jimatqsi

Just as Rabbit is saying ... change "1" to 1 and "0" to 0

Jim

4 1136
Rabbit
12,516 Expert Mod 8TB
If what you are saying is correct and transactid is an autonumber, then that it's a numeric data type but you're treating it like a string.
Aug 25 '13 #2
jimatqsi
1,271 Expert 1GB
Just as Rabbit is saying ... change "1" to 1 and "0" to 0

Jim
Aug 25 '13 #3
neelsfer
547 512MB
Thx thx rabbit , i have been wrestling with this issue for a year. Yesterday while out riding my mountain bike i realized that i am doing things very inefficiently and the size of my database needs to be trimmed ASAP. i can now probably half the size of my database, as i use to append this data individually into about 15 separate fields in the table, in real time.
Aug 25 '13 #4
neelsfer
547 512MB
thx jimatqsi for your input also
Aug 25 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Debbie Davis | last post by:
Greetings, I have a page displaying records in a table across but there are too many records to display and they run off the page, SO I thought I could show five columns with an unlimited number...
5
by: Jack | last post by:
Hi, I need to build a asp page where it would serve as a data entry record page as well as display page for records saved. This page should also allow editing of records that has been saved. ...
1
by: mo | last post by:
I'm using the query desinger in ASP.NET , however the number of records in the resultset are not displaying, so I cut and paste it into Query analyzer which is silly. How do I set this in the...
0
by: BobbyChat | last post by:
Is there a way to display more than one record at a time on a popup form? I have a main form that has a button that triggers a popup form that is a continuous form. I am trying to get it to display...
1
by: PMBragg | last post by:
ORINGINAL Post >Thank you in advance. I'm trying to pull all inventory items from December >of the previous year back to 4 years for my accountant. I know this can be >done, but I'm drawing a...
1
by: Megan | last post by:
Hi everybody- For some reason, I cannot get this query to work. I have 2 identical tables. One table is new, the other is old. I want to be able to tell which records in the newer table are...
2
by: Viviana R via AccessMonster.com | last post by:
I'm tryin to calculate de difference of time between different records and fields. I have a Report with date, time In, and Time Out fields. EX: Date Time IN Time Out 4/12/05 12:10...
1
by: awu | last post by:
All: I use two tables to generate a query. The fields in table 1: stylenumber productline One productline can have many stylenumbers in this table. The field in table 2: stylenumber
4
dnb
by: dnb | last post by:
Hi.... How to set perticular number of records to display on one page of datareport in vb6.0? I want to display 10 records on one page of datareport.
3
by: Coll | last post by:
I have a form that had been setup with a combo box. You'd select a value from the combo box and a query would open and display matching records. I now need to remove the combo box and set up a text...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.