Access 2k3 Forgetting my code? :(

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

    #1

    Access 2k3 Forgetting my code? :(

    Hi all,

    I have a form with a combo box and a button, from this combo box
    you select a week you would like to view a report on and hit the
    button. This then sets the reports filter to a specific date and opens
    it showing the information for that date, my problem is it doesen't
    seem to always work. I will select a week, and hit the button, which
    sets the filter, then opens the report (tried opening then setting as
    well) and it will just open the report with data from the last time i
    selected a week, and it just will not change its data, as of right now
    it seems stuck on week 43. Yesterday it was doing this so I put a
    msgbox in code for testing purposes and as soon as that was in place it
    started working and continued to after I took the msgbox out. Anyone
    have any ideas?

  • Rick Brandt

    #2
    Re: Access 2k3 Forgetting my code? :(

    Beacher wrote:[color=blue]
    > Hi all,
    >
    > I have a form with a combo box and a button, from this combo box
    > you select a week you would like to view a report on and hit the
    > button. This then sets the reports filter to a specific date and opens
    > it showing the information for that date, my problem is it doesen't
    > seem to always work. I will select a week, and hit the button, which
    > sets the filter, then opens the report (tried opening then setting as
    > well) and it will just open the report with data from the last time i
    > selected a week, and it just will not change its data, as of right now
    > it seems stuck on week 43. Yesterday it was doing this so I put a
    > msgbox in code for testing purposes and as soon as that was in place
    > it started working and continued to after I took the msgbox out.
    > Anyone have any ideas?[/color]

    You are setting the report filter and THEN opening it? How exactly? Are you
    opening it first in design view? That would be totally unnecessary. The
    OpenReport method includes an argument for applying a WHERE clause when the
    report is opened. That is what you should be using.

    --
    I don't check the Email account attached
    to this message. Send instead to...
    RBrandt at Hunter dot com


    Comment

    Working...