Results 1 to 2 of 2
  1. #1
    sanmagoo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    1

    formatting report detail based on group heading

    I have a report that is an item listing with up to 4 ship dates. The dates are unique by vendor and vendor items may or may not be available for the 4 dates. Vendor may also have 1,2,3 or 4 dates. Maximum is 4.



    I am showing the report by vendor with vendor # and Name as grouping. The detail is the item information. The headers for each grouping is
    Item# Desc Pack Size Allowance Cost date1(mm/dd/yy) date2(optional) date3(opt) date4(opt)

    For the detail I am showing either a blank space if available and an X if unavailable.
    For Vendors that have less than 4 ship dates I am not display column header. if available the actual date is displayed.

    My problem is not displaying the X in the detail section when the corresponding ship date doesn't exist
    ex.
    Item# Desc Pack Size Allowance Cost 6/3/2013 7/1/2012
    123 red toy 12 2oz 1.15 8.19 X X X

    My report record source is:
    SELECT Vendors.Vendor_num,
    Vendors.Name,
    Item.item,
    Item.Desc,
    Item.Pack,
    Item.item_size,
    Item.allowance,
    Item.points,
    Item.Retailer_Price,
    Item.Cust_Use,
    IIf(IsNull([item.Del1_date]),"X","") AS del1st_date,
    IIf(IsNull([item.Del2_date]),"X","") AS del2nd_date,
    IIf(IsNull([item.Del3_date]),"X","") AS del3rd_date,
    IIf(IsNull([item.Del4_date]),"X","") AS del4th_date,
    Vendors.del1_date,
    Vendors.del2_date,
    Vendors.Del3_date,
    Vendors.Del4_date
    FROM Vendors
    LEFT JOIN Item ON Vendors.[Vendor_num] = Item.[Vendor_num];

    I think I need a if then elseif kind of fix here. I am not an access developer. I am a VB programmer but this is being asked for as an Access Report. Any help would be most appreciated.

    Tom

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Don't understand issue.

    That query should only show "X" if the date field has value. Looks like it should accomplish what you want. If not, what is happening?
    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: 6
    Last Post: 03-26-2013, 12:17 PM
  2. Replies: 1
    Last Post: 02-24-2012, 12:36 PM
  3. Counting Detail Records by Group
    By Paul H in forum Reports
    Replies: 7
    Last Post: 10-21-2011, 02:53 PM
  4. Replies: 0
    Last Post: 03-14-2011, 08:38 AM
  5. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08:53 AM

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