Set db = CurrentDb()
Set qD = db.CreateQueryDef("", "Delete * From [tblIndiceInformeGeneral]")
qD.Execute
qD.Close
Set qD = db.CreateQueryDef("", "Delete * From [tblIndiceInformeGrSgrCult1]")
qD.Execute
qD.Close
DoCmd.OutputTo acOutputReport, "infGeneralParcial_paginador", acFormatSNP, CurrentProject.Path & "\temp1.snp", False
DeleteFile ("" & CurrentProject.Path & "\temp1.snp")
DoCmd.OutputTo acOutputReport, "infGrSgrCultivoSel_paginador", acFormatSNP, CurrentProject.Path & "\temp2.snp", False
DeleteFile ("" & CurrentProject.Path & "\temp2.snp")
Set db = CurrentDb
Set rst = db.openrecordset("tblIndiceInformeGeneral")
Do Until rst.EOF = True
With rst
.Edit
rst!pagina = rst!pagina + IncrementNPagesPG
.Update
.MoveNext
End With
Loop
Set rst = Nothing
Set db = Nothing
NPageRef = NPageRef + IncrementNPagesPG
DoCmd.OutputTo acOutputReport, "infGeneralConPGINDICE_paginador", acFormatSNP, CurrentProject.Path & "\temp3.snp", False
DeleteFile ("" & CurrentProject.Path & "\temp3.snp")
DoCmd.OpenReport "infGeneralParcialConPG", acViewPreview
DoCmd.Close acForm, "frmImprimir"
DoCmd.SelectObject acReport, "infGeneralParcialConPG"
DoCmd.Maximize
If GetVersion() <> "12.0" Then
DoCmd.ShowToolbar "Ventana2", acToolbarYes
DoCmd.ShowToolbar "Print Preview", acToolbarNo
Else
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.ShowToolbar "Print Preview", acToolbarYes
End If