Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Location
    Northfield, Minnesota, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parameters on Reports (Access 2000)

    I have a parameter query that prompts for the date range
    Between [Enter start date] And [Enter end date]

    I have built a report the summarizes the results by counting how many visits for each day of the week.

    My question:
    I want to display in the header the parameters that I type into the prompts:
    i.e. "Visits for 9/15/2002

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Parameters on Reports (Access 2000)

    They are not in the field list, but you can type them yourself in an expression: create a text box with Control Source

    ="Visits for " & [Enter start date] & "

  3. #3
    New Lounger
    Join Date
    Feb 2003
    Location
    Northfield, Minnesota, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameters on Reports (Access 2000)

    That worked wonderfully !
    Thank you
    Al

  4. #4
    New Lounger
    Join Date
    Feb 2003
    Location
    Northfield, Minnesota, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameters on Reports (Access 2000)

    Now I am trying to put more into the same text box but I want it to be on another line.
    How can I get a carriage return or line break?
    In my code below I would like to break the line right before Academic Year.

    ="For time period" & [Enter start date] & " - " & [Enter end date] & "Academic Year " & [Enter Academic Year]

    I was looking in help. Where would I find out how to do this?

    Thank you
    Al

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Parameters on Reports (Access 2000)

    It is not so easy to find something like this in the online help, since it involves using a VBA function in an expression. There is some help on using functions in expressions, but if you don't know what you are looking for, you won't get far. You can use the Expression Builder (Ctrl+F2) to create an expression; this can display a list of functions, but again, you already need to know what you are looking for.

    The "code" for a line break is Chr(13) & Chr(10), i.e. carriage return / line feed, so you can use

    ="For time period" & [Enter start date] & " - " & [Enter end date] & Chr(13) & Chr(10) & "Academic Year " & [Enter Academic Year]

    Or you could create a custom function in a VBA module:

    Public Function NewLine() As String
    NewLine = vbNewLine
    End Function

    and use it instead of Chr(13) & Chr(10):

    ="For time period" & [Enter start date] & " - " & [Enter end date] & NewLine() & "Academic Year " & [Enter Academic Year]

  6. #6
    New Lounger
    Join Date
    Feb 2003
    Location
    Northfield, Minnesota, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameters on Reports (Access 2000)

    Thank you for all of your help
    Alec

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •