if statement???

  • Thread starter Thread starter Alienz
  • Start date Start date
A

Alienz

I have a table with no primary key and its getting me into some
trouble as usual!!

Table: Inventory

Fields: Product, Price, Location

Each product has the same price, but perhaps a different location.
So, when I run a cost query, it brings up the product multiple times
due to the multiple locations. Is there a way I can use an If
statement like if([me].[location]="a")then DO NOT OUTPUT ME.LOCATION
AFTERWARDS AS I ONLY WANT 1 PRICE

PS
(i am not screaming)
 
What about creating a totals query:

field product price location
totals group by first first

Is location important at all or do you just want to show
one product and its price?
 
yeah it's important what I need changed a bit though. Now basically I
filtered out 1 location and it's not repeating anymore. But, the
location that I filtered out still has stock. So, is there anyway to
add to my query the stock for the 2nd location to a new field? I
tried linking 2 queries together but it wouldn't let it do that.

table: Inventory
part location price stock
A HERE 15.00 10
A THERE 22.00 99

So I filtered out Location="THERE" but I need a 5th field that tells
me the stock of Location="HERE" as that information is still unique.

Any suggests? Merci.
 
I wrote that post way too early, how about I try to simplifiy my
question :p

Basically I have a very simple issue now.. I have say a table with 4
fields and I want a 5th to be created in a query!

table: Inventory
part location price stock
A HERE 15.00 10
A THERE 15.00 99

I have a query that has for criteria <location not "THERE"> so I'm
only getting the HERE inventory so that A doesn't repeat such that I
can get the price of A. The problem is that I still want to know the
stock of THERE alongside (say as a 5th field in the query). I tried
this but it wouldn't allow me to see that info due to the criteria
disallowing THERE. I know I should just make a new table but lets say
I used this table quite a bit already and it would just be a hassle so
I'm trying a workaround. Thanks anyone..
 
Back
Top