Results 1 to 3 of 3
  1. #1
    ColbyDog is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    5

    Selecting Records by Part Size

    Hello, I'm looking for help with an issue selecting parts by their dimensions/size. I have a very large quantity of parts that I need to condense to a manageable report. I want to show only the smallest size of each product that we offer and thought that something like this may be the way to go:



    Tile Type Size Price AutoNumber Show
    Black Granite 6" 6.00 1 X
    Black Granite 12" 12.00 2
    Black Granite 18" 18.00 3
    Green Granite 12" 12.00 1 X
    White Granite 6" 6.00 1 X
    White Granite 12" 12.00 2
    White Granite 18" 18.00 3
    Black Marble 6" 12.00 1 X
    Black Marble 12" 24.00 2
    Black Marble 18" 36.00 3
    Pink Marble 18" 36.00 1 X

    Filtering on the "X"s would leave a much smaller report that contains only the "starting prices" like this:

    Tile Type Size Price AutoNumber Show
    Black Granite 6" 6.00 1 X
    Green Granite 12" 12.00 1 X
    White Granite 6" 6.00 1 X
    Black Marble 6" 12.00 1 X
    Pink Marble 18" 36.00 1 X

    The audience would know exactly how to use this report.

    Does anyone know if it is possible to populate an autonumber within a category? and to then flag or filter on the smallest autonumber value, which would be "1"?

    As always, I appreciate your taking the time to read this. Cheerss!

  2. #2
    ColbyDog is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    5
    Sorry, I had it spaced to mimic a table. I didn't realize the spaces would be removed. If you can read delimited text, each row is assigned a number within the category (right before the "X").

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Assigning a unique identifier sequence for each group would require VBA code or possibly an UPDATE query using DCount() function. However, it might not be necessary to have this field in table to return the appropriate record.

    Because the Size field is text, not number, this is a bit trickier.

    SELECT *, Val([Size]) AS Expr1
    FROM Tablename
    WHERE (((Val([Size]))=DMin("Val(Size)","Tablename","Tile='" & [Tile] & "' AND Type='" & [Type] & "'")));
    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: 9
    Last Post: 07-22-2013, 03:37 PM
  2. Replies: 1
    Last Post: 05-10-2013, 01:39 PM
  3. Selecting records based on particular value
    By usman400 in forum Queries
    Replies: 4
    Last Post: 09-30-2011, 07:58 AM
  4. Selecting records within a form
    By crowegreg in forum Programming
    Replies: 29
    Last Post: 08-19-2011, 08:18 AM
  5. Replies: 1
    Last Post: 03-17-2006, 12:04 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