Results 1 to 2 of 2
  1. #1
    pmatush is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    11

    How to modify report based on input form

    I have a report that shows costs on various projects. The user can use a form to filter on dates, names, regions, etc. In the report there is a date field that the report is sorted on, to show a chronological history of the projects. However, I want the report to be customizable such that the user can select from a combo box in the form whether he wants to use the start date, completion date, or the date of first use of the project.

    In the original report, I only included the project start date, so the control source of the report field was 'start date' the same as the field in the contributing query. In the query, i've added fields for all three date types, which are named 'start date', 'end date', and 'first use'. those are the same names i have in my combo box, but when i set the control source for the report field to =[forms]![project totals]![datetype](my combo box), it lists 'start date' for each record in the report instead of 'mm/dd/yy' is there a way to tell the control source that the form selection is actually a field, instead of just text? or am i going about this all wrong.

    Thanks in advance,


    Patrick

  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,920
    ControlSource property doesn't work that way. You could put a nested IIf expression in the ControlSource:

    =IIf([forms]![project totals]![datetype]="start date", [StartDate], IIf([forms]![project totals]![datetype]="end date", [EndDate],[FirstUse]))
    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. Building Input Form Based on Two Tables
    By tx_developer in forum Forms
    Replies: 4
    Last Post: 07-28-2012, 01:51 PM
  2. View Data based on Form Input?
    By 0REDSOX7 in forum Forms
    Replies: 7
    Last Post: 11-29-2011, 10:25 AM
  3. Run a query based on an input from a form
    By apoorv in forum Queries
    Replies: 4
    Last Post: 07-11-2011, 01:39 PM
  4. Replies: 2
    Last Post: 06-17-2010, 04:15 PM
  5. Replies: 1
    Last Post: 06-14-2010, 02:31 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