473,396 Members | 1,996 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,396 software developers and data experts.

How do I write a query so if a field is blank it won't show

MJ
I have 4 pricing levels for products. Each customer has only 1 level.
If a customer is pricing level 1, I don't want pricing levels 2-4 to
show up on the query for each product. How can I accomplish this?

Thanks in advance for your help!

Nov 13 '05 #1
6 1398
MJ wrote:
I have 4 pricing levels for products. Each customer has only 1 level.
If a customer is pricing level 1, I don't want pricing levels 2-4 to
show up on the query for each product. How can I accomplish this?

Thanks in advance for your help!


Put a criteria on the query like

WHERE pricing_level IS NOT NULL

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Nov 13 '05 #2
MJ
I have tried that and it didn't work.

I need a formula for each Level in the query that tells it if the
Customer Pricing Level is 1 that it shouldn't show pricing for levels
2, 3, 4. I just don't know how to write the formula. The fields are:

PricingLevel (from the CustomerInfo Table)

PriceLevel1 (from the Product Table)
PriceLevel2 (from the Product Table)
PriceLevel3 (from the Product Table)
PriceLevel 4 (from the Product Table).

If a customer has purchased an item and it level 1, I don't want it to
show the prices for the other 3 levels for the sasme item. I hope
that makes sense.

Nov 13 '05 #3
MJ wrote:
I have tried that and it didn't work.

I need a formula for each Level in the query that tells it if the
Customer Pricing Level is 1 that it shouldn't show pricing for levels
2, 3, 4. I just don't know how to write the formula. The fields are:

PricingLevel (from the CustomerInfo Table)

PriceLevel1 (from the Product Table)
PriceLevel2 (from the Product Table)
PriceLevel3 (from the Product Table)
PriceLevel 4 (from the Product Table).

If a customer has purchased an item and it level 1, I don't want it to
show the prices for the other 3 levels for the sasme item. I hope
that makes sense.


Sorry, it doesn't. What exactly are you looking at where you don't want to see
the other price levels? Directly at the query? If only one of them will ever
have a price entered why not just add them all together and display the result
in your query? Then you have a single price level field in the query output
regardless of which field in the source was used.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #4
MJ
I am looking for the Price Level in a query to pull the correct price
for an item and store it in a table. I also would like to be able to
only see that correct price in a form.

Nov 13 '05 #5
sounds like you need to normalize your pricing level information.

tblPricingLevel
ProductID
PricingLevelID
Price

eg
(1,1,50)
(1,2,55)
(1,3,60)
(1,4,65)

Then you could just use a query. if you want to save the value into
your table, you could do that in the afterupdate event of the productID
control on your form.

Nov 13 '05 #6
Ali
if PricingLevel is integer use "Choose" function:

choose(PricingLevel,PriceLevel1,PriceLevel2,PriceL evel3,PriceLevel4)
if it is string (such as "PricingLevel1") you should change it to
integer first.

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: RBohannon | last post by:
I have a report with most fields populated by a query. However, some of the fields are variable in such a way that their values cannot be queried from a table. At present the values for these...
1
by: johnniewalkeresp | last post by:
Hi, I'm having trouble with the following: I have a portfolio table with a field called "Bid/Offer" which is filled in by selecting Bid or Offer from a combo box. Now I need to create a query...
9
by: muddasirmunir | last post by:
i have a simple query and does not getting desire results which i want i am using vb6 and access i had a table with with 8 fields but just to simplyfy by question i am just supposing to four. ...
9
by: Sinner | last post by:
Hi, I have a field name 'USER' in tableMAIN. How do I replace the user names with corresponding user names. I can do that in xl using vlookup but now I'm trying to find a way to do that in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.