CERRAR UN DATAREPORT
HOLA
ALGUIEN SABE COMO PUEDO CERRAR UN DATAREPORT??
ES Q CUANDO PULSO EL BOTON DE IMPRIMIR, IMPRIMO EL INFORME Y LUEGO SI ANTES DE SALIR DE LA APLICACION LE VUELVO A DAR, ME DICE Q NO PUEDO USARLO PQ ESTA EN USO.
COMO SE HACE?? LO SABE ALGUIEN??
ALGUIEN SABE COMO PUEDO CERRAR UN DATAREPORT??
ES Q CUANDO PULSO EL BOTON DE IMPRIMIR, IMPRIMO EL INFORME Y LUEGO SI ANTES DE SALIR DE LA APLICACION LE VUELVO A DAR, ME DICE Q NO PUEDO USARLO PQ ESTA EN USO.
COMO SE HACE?? LO SABE ALGUIEN??
Hola Ana, espero que te ayude.
Por supuesto tienes que limpiar el código de lo que no uses ( DB Combo...).En el command para mostrar el reporte:
Private Sub Command3_Click()
If DataEnvironment1.rsCommand1.State = adStateOpen Then
DataEnvironment1.rsCommand1.Close
End If
If Text1.Text <> "" Then
DataEnvironment1.Command1 DBCombo2.Text
DataReport1.Show
Else
MsgBox " Texto invalido !!!", vbCritical, "Data Report - Usando Parametros"
End If
End Sub
Por supuesto tienes que limpiar el código de lo que no uses ( DB Combo...).En el command para mostrar el reporte:
Private Sub Command3_Click()
If DataEnvironment1.rsCommand1.State = adStateOpen Then
DataEnvironment1.rsCommand1.Close
End If
If Text1.Text <> "" Then
DataEnvironment1.Command1 DBCombo2.Text
DataReport1.Show
Else
MsgBox " Texto invalido !!!", vbCritical, "Data Report - Usando Parametros"
End If
End Sub