Date displaying

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Russ

    Date displaying

    I've got a report that puts dates at the top of columns and the user
    is prompted to enter a beginning date when the report is opened. That
    date is put in a textbox in the first column like this:

    =DateValue([Enter 1st date to display - Ex: 1/5/03])

    Then the next columns are textboxes that add 7 to the previous column
    for the date display of the next week like this:

    =[Text12]+7

    This goes for a six month period.

    The problem is sometimes the report will not display the first half of
    the 6 months, and I have to fix it by cutting the columns that are not
    displaying and pasting them back into the report. Is there another
    way I can display these dates to *possibly* avoid this problem?

    Russ
  • Allen Browne

    #2
    Re: Date displaying

    Russ, the crucial thing is to ensure Access understands the data type.

    Base the report on a query, and declare the parameter in the query
    (Parameters on Query menu in query design). This way you can specify that it
    is a Date/Time type.

    In the report, set the Format property of the text boxes to:
    Short Date
    or similar. This way, Access knows the intended data type.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html

    "Russ" <Rusty@notathom e.com> wrote in message
    news:4cr8mvkccn iv6be6mj3vfjual u4p1vkqug@4ax.c om...[color=blue]
    > I've got a report that puts dates at the top of columns and the user
    > is prompted to enter a beginning date when the report is opened. That
    > date is put in a textbox in the first column like this:
    >
    > =DateValue([Enter 1st date to display - Ex: 1/5/03])
    >
    > Then the next columns are textboxes that add 7 to the previous column
    > for the date display of the next week like this:
    >
    > =[Text12]+7
    >
    > This goes for a six month period.
    >
    > The problem is sometimes the report will not display the first half of
    > the 6 months, and I have to fix it by cutting the columns that are not
    > displaying and pasting them back into the report. Is there another
    > way I can display these dates to *possibly* avoid this problem?
    >
    > Russ[/color]


    Comment

    • Russ

      #3
      Re: Date displaying

      Allen,

      I've set the format of the text boxes to date as you suggested, but
      for now I am going to get the input when the report runs, not when the
      query runs. If it happens again, I'll work on the query. This
      approach doesn't seem to be headed in the right direction however,
      because the last 6 months of dates always works just fine.

      Russ

      On Sun, 14 Sep 2003 15:49:08 GMT, "Allen Browne"
      <abrowne1_SpamT rap@bigpond.net .au> wrote:
      [color=blue]
      >Russ, the crucial thing is to ensure Access understands the data type.
      >
      >Base the report on a query, and declare the parameter in the query
      >(Parameters on Query menu in query design). This way you can specify that it
      >is a Date/Time type.
      >
      >In the report, set the Format property of the text boxes to:
      > Short Date
      >or similar. This way, Access knows the intended data type.[/color]

      Comment

      Working...