Prev: Report header below page header
Next: Assemby Report
From: PayeDoc on 9 Mar 2010 07:35 Hello All I have a number of reports where I have set the OnNoData event to Cancel = True. This works fine where the user attempts to open one of the report usign a button created with the wizard for that purpose, but if they click a button where the OnClick event includes lots of DoCmd OpenReport commands, when the code reaches a report with no data they get a message that the OpenReport was cancelled - and the code stops. What do I do? Hope someone can help Many thanks Leslie Isaacs
From: John Spencer on 9 Mar 2010 08:37 Do you have error handling in your code? IF so, does it use Resume Next? We can't see the code you are using unless you post it and therefore it is difficult to make suggestions to overcome the problem. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County PayeDoc wrote: > Hello All > > I have a number of reports where I have set the OnNoData event to Cancel = > True. This works fine where the user attempts to open one of the report > usign a button created with the wizard for that purpose, but if they click a > button where the OnClick event includes lots of DoCmd OpenReport commands, > when the code reaches a report with no data they get a message that the > OpenReport was cancelled - and the code stops. > > What do I do? > Hope someone can help > > Many thanks > Leslie Isaacs > >
From: PayeDoc on 11 Mar 2010 11:09 John Many thanks for your reply - and apologies for the delay in my responding, I had to be away unexpectedly. I didn't have error handling, but now I do!! I suddenly remembered that this was about handling error 2501, which I have now done. Thanks again Les "John Spencer" <spencer(a)chpdm.edu> wrote in message news:OqFh024vKHA.4908(a)TK2MSFTNGP06.phx.gbl... > Do you have error handling in your code? IF so, does it use Resume Next? > > We can't see the code you are using unless you post it and therefore it is > difficult to make suggestions to overcome the problem. > > John Spencer > Access MVP 2002-2005, 2007-2010 > The Hilltop Institute > University of Maryland Baltimore County > > PayeDoc wrote: > > Hello All > > > > I have a number of reports where I have set the OnNoData event to Cancel = > > True. This works fine where the user attempts to open one of the report > > usign a button created with the wizard for that purpose, but if they click a > > button where the OnClick event includes lots of DoCmd OpenReport commands, > > when the code reaches a report with no data they get a message that the > > OpenReport was cancelled - and the code stops. > > > > What do I do? > > Hope someone can help > > > > Many thanks > > Leslie Isaacs > > > >
|
Pages: 1 Prev: Report header below page header Next: Assemby Report |