← Foro de Visual Basic

CERRAR UN DATAREPORT

Hilo en el foro de Visual Basic · 27 de Febrero del 2004 · 1 respuestas
ana27 de Febrero del 2004
Pregunta
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??

Respuestas 1

sonia rodri27 de Febrero del 2004
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
¿Buscas más hilos como este? Mira el foro de Visual Basic o usa el buscador.