Results 1 to 6 of 6
  1. #1
    ice is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    4

    Other Category affected by changing a condition in a query?

    Hi I have a condition in one of my field named "Material type" and the condition is to show only those that are called "zext". This is in QUERIES. But now we need to add the name called "zerv" So I just add that name in condition using (or). I tried to run it, but the report still shows those that are "zext".



    I'm not sure if there are things that must be changed as well like in tables, forms, etc.

    Kindly help! thanks in advance!

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Switch your query to SQL View, and copy and paste the code here so we can see how you have written it.

  3. #3
    ice is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    4
    Quote Originally Posted by JoeM View Post
    Switch your query to SQL View, and copy and paste the code here so we can see how you have written it.
    Hi


    Hi, thanks a lot for your reply. Here's the code for one of many queries that i changed. hope it would help.

    SELECT ZQR.[Material Number], ZQR.Plant, ZQR.[Sales Org#], ZQR.[Purchasing Org#], ZQR.[Distr# Channel], ZQR.[Base Unit], ZQR.GenItemCatGroup, ZQR.[Material Type], ZQR.[Material Group], ZQR.[X-plant status], ZQR.[D-Ch#Statu], ZQR.[Deliver#plant], ZQR.[Gross Weight], ZQR.[Net Weight], ZQR.[Weight unit], ZQR.Volume, ZQR.[Tariff No#], ZQR.[Exp# ctrl# cl - EU], ZQR.[Exp# ctrl# cl - EUS], ZQR.[SC Code], ZQR.[Item cat#group], ZQR.[P-Code], ZQR.[Ctry of origin], ZQR.[Purch# Group], ZQR.[Valua#price], ZQR.[Company Currency], ZQR.[Tax classific#], ZQR.[Valuation Class]
    FROM ZQR
    WHERE (((ZQR.[Material Type])="zext") AND ((ZQR.[D-Ch#Statu])="04")) OR (((ZQR.[Material Type])="zerv") AND ((ZQR.[D-Ch#Statu])=""));

  4. #4
    ice is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    4
    Hi JoeM, never used the sql view, it helps a lot reading it. I think I can solve it now. I will try later, with this new code.

    SELECT ZQR.[Material Number], ZQR.Plant, ZQR.[Sales Org#], ZQR.[Purchasing Org#], ZQR.[Distr# Channel], ZQR.[Base Unit], ZQR.GenItemCatGroup, ZQR.[Material Type], ZQR.[Material Group], ZQR.[X-plant status], ZQR.[D-Ch#Statu], ZQR.[Deliver#plant], ZQR.[Gross Weight], ZQR.[Net Weight], ZQR.[Weight unit], ZQR.Volume, ZQR.[Tariff No#], ZQR.[Exp# ctrl# cl - EU], ZQR.[Exp# ctrl# cl - EUS], ZQR.[SC Code], ZQR.[Item cat#group], ZQR.[P-Code], ZQR.[Ctry of origin], ZQR.[Purch# Group], ZQR.[Valua#price], ZQR.[Company Currency], ZQR.[Tax classific#], ZQR.[Valuation Class]
    FROM ZQR
    WHERE (((ZQR.[Material Type])="zext") AND ((ZQR.[D-Ch#Statu])="04")) OR (((ZQR.[Material Type])="zerv") AND ((ZQR.[D-Ch#Statu])="04")) OR (((ZQR.[D-Ch#Statu])=""));

  5. #5
    ice is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    4
    now it worked! thanks a lot for introducing the SQL view

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Great, glad to hear you got it sorted out!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Form size affected by tabs in editor!?
    By BayerMeister in forum Forms
    Replies: 6
    Last Post: 04-15-2014, 10:10 AM
  2. Query: select latest date within given category
    By martinhough in forum Queries
    Replies: 4
    Last Post: 10-22-2013, 12:34 PM
  3. Add Query Based on if Condition
    By shakeelmscw in forum Queries
    Replies: 17
    Last Post: 01-18-2013, 02:35 AM
  4. Query for each category
    By snowboarder234 in forum Queries
    Replies: 1
    Last Post: 07-03-2012, 01:52 PM
  5. Help with writing Query If Then Condition
    By taimysho0 in forum Queries
    Replies: 4
    Last Post: 01-20-2012, 06:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums