Results 1 to 8 of 8
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Synchronising Subreport with Form (2003)

    The Rprev report in the attached mdb has code in its Open event that doesn't work if I insert the report into another report(Report2). How can I make the Rprev subreport synchronise with the date selected in the Prev form when it is designed as a subreport?

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

    Re: Synchronising Subreport with Form (2003)

    Why is it a subreport? The main report only contains the subreport, so you might as well not use it.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Synchronising Subreport with Form (2003)

    Hi Hans,
    I'm going to add other subreports to the Report2 main report.

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

    Re: Synchronising Subreport with Form (2003)

    Will those have to be synchronized with the date in the form too?

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Synchronising Subreport with Form (2003)

    Yes

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

    Re: Synchronising Subreport with Form (2003)

    The best way is probably:
    - Create a query that returns the date from the form

    SELECT DISTINCT Giorno FROM Previsioni WHERE Giorno = Forms!Prev!CGior

    - Set the Record Source of the main report to the name of the query.
    - Link the subreports to the main report on the Giorno field.
    - Remove the On Open code from the subreport (the other code is useless - you can't maximize or restore a subreport)

  7. #7
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Synchronising Subreport with Form (2003)

    Thank you Hans,
    How come I can't get the subreport Page Header to show when I open the main report?

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

    Re: Synchronising Subreport with Form (2003)

    Because "page" has no meaning in a subreport. If you want a header, use the report header or a group header.

Posting Permissions

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