Results 1 to 2 of 2
  1. #1
    Dhiresh is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    1

    Adding conditiona criteria to select data i.e. greater than relevant value

    HI VBA Gurus….

    I have an Access Query that makes another table (for selected columns) and 3 of these have ‘Ascending’ sorts. This is working great.

    However, I want to add conditions to this requirement

    1. if in column “OTHER1” = X then get a relevant code number from “Levels” and if the level value is 1 then select all data for values greater than 0 (i.e. 1 and above); if the level value is 2 then select all values greater than 1 (i.e. 2 and above); if the level value is 3 then select all values greater than 2 (i.e. 3 and above) and so on – limit is 5.
    2. Exclude all data where the word “Blanks” appears in Column “Level”
    3. Retain ‘Ascending’ sorts for the 3 colums




    I guess this can be done using VBA and I have very little knowledge of this.

    Please can someone help.

    Thanking you in advance.
    Dhiresh

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Why do you need to make table?

    Don't understand item 1. If 5 records have X and 1 of them has Level 1 and 2 have Level 3 and 2 have Level 5, which criteria should be applied as filter?

    2. criteria: <> "Blanks"

    3. apply sort order in query or in report
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-09-2013, 09:32 PM
  2. Replies: 3
    Last Post: 11-29-2012, 11:00 AM
  3. Replies: 2
    Last Post: 11-24-2012, 01:16 PM
  4. Replies: 5
    Last Post: 08-02-2012, 09:44 AM
  5. Replies: 0
    Last Post: 04-03-2009, 01:15 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