report in a loop

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I use doCmd.SendObject to send out the reports by in email in the
loop.

I just realized that the report does not re accept new parameters from
my VBA code.

I tried to force close the report like following:

DoCmd.Close acReport, "MyReport"


DoCmd.SendObject acSendReport, stDocName, acFormatRTF,
rs.Fields("Email_ID").Value, fOSUserName, , _
" My Content", False

it still gets the first report result.

Any workaround for this issue?

Your help is great appreciated,




.



Relevant Pages

  • Re: Running a parameter query based on multi select list box values
    ... provided I had previously used to build my report data upon. ... MsgBox "You must select a value from the Agency list", vbOKOnly, ... 'Trim the strAgency variable and add the "IN clause used in the query ... For Each x In .ItemsSelected ' Loop through the values ...
    (microsoft.public.access.modulesdaovba)
  • ACC2000: bloat after saving report via code
    ... So I have a routine that makes a PDF for each customer in a loop. ... customer, save the report, and makes a PDF from the changed report. ... This error is from the Docmd above when I open the report in design mode ...
    (microsoft.public.access.reports)
  • Re: RFC: About error handling - WAS: Re: A remobjects wtf...
    ... Please implement the 'Retry' keyword. ... Even if above can be simulated by using fake loops, the main disadvantage is that the fake loop 'hides' a possible real loop and thus the developer cannot use 'Break/Continue' for the outside real loop. ... Also there are other workarounds based on 'while' and recursion worth mentioning, but we stop here due of report readability reasons. ...
    (borland.public.delphi.non-technical)
  • Re: Maximising report previews
    ... This means pausing the Do loop in order to take the necessary ... One way of doing this is to open the report in dialogue mode and a second is ... to open it from an intermediate form which is itself opened in dialogue mode. ... form which was itself opened in dialogue mode then, even though the maximise ...
    (microsoft.public.access.formscoding)
  • Re: Save report letters to file
    ... I was beginning to think i would have to resort to VBA. ... ...save report for individual record ... first of all how do i loop through the records of a query ...
    (microsoft.public.access.macros)