Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This action will reset the current code in break mode

Status
Not open for further replies.

anapaula

Programmer
Jul 8, 2002
3
PT
I have a form that has a button to open a report based on the choice made on the form. SOMETIMES, after open the report the message is "his action will reset the current code in break mode" If I say yes it repeat the same question again and again and I have to shut down the application...
Could someone help me...please
 
Este é o código associado ao botão que abre o relatório

Private Sub previsualizar_Click()
Dim criterio As String

On Error GoTo Err_previsualizar_Click

criterio = Me.Filter
If criterio = "" Then
DoCmd.OpenReport "ProcessosDocumentos", acViewPreview
Else
DoCmd.OpenReport "ProcessosDocumentos", acViewPreview, , criterio
End If

Exit_previsualizar_Click:
Exit Sub
Err_previsualizar_Click:
MsgBox Err.Description
Resume Exit_previsualizar_Click


End Sub

Este é o código associado ao relatório

Private Sub Report_Activate()
DoCmd.Maximize
DoCmd.ShowToolbar "Relatorios", acToolbarYes
DoCmd.Close acForm, "ProcessosLDocumentos", acSaveNo
End Sub

Private Sub Report_Close()
DoCmd.ShowToolbar "Relatorios", acToolbarNo
End Sub

Private Sub Report_NoData(Cancel As Integer)
MsgBox "Não existem dados de Processos para visualizar", vbInformation, "A listagem está vazia"
Cancel = True
End Sub
 
I'm guessing the problem is with the code for

Private Sub Report_NoData(Cancel As Integer)
MsgBox "Não existem dados de Processos para visualizar", vbInformation, "A listagem está vazia"
Cancel = True
End Sub

You are opening the report in Preview, and the NoData Event is designed to work when you are printing the report. Try getting rid of the NoData event (just delete Event Procedure from the Event line, that will keep it from running).

Run your report a few times and see if you still get the message.

Paul
 
That is not the problem because I tried and it didn't work. All my reports use that kind of code. I think the problem is my report has 3 subreports (even if it has only one) and that message occur when I put the subreport on the main report
Thanks...
Ana Paula Leal
 
Ana Paula, what exactly do you mean when you say, "I think the problem is my report has 3 subreports (even if it has only one) and that message occur when I put the subreport on the main report"

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top