Ayuda Urgente
Publicado por ana (6 intervenciones) el 14/11/2002 15:41:59
hola , resulta que quiero hacer un reporte donde lo pueda imprimir por fecha es decir, desde 1/11/2002 hasta 15/11/2002 y tengo el siguiete codigo:
Private Sub Command1_Click()
Crys.DataFiles(0) = App.Path + \\\"\\\\Mer.Mdb\\\"
Crys.ReportFileName = App.Path + \\\"\\\\Estadisticas.Rpt\\\"
Crys.Formulas(0) = \\\"DESDE=\\\'\\\" & DTPicker1.Value & \\\"\\\'\\\"
Crys.Formulas(1) = \\\"HASTA=\\\'\\\" & DTPicker2.Value & \\\"\\\'\\\"
Y1 = Year(DTPicker1.Value)
Y2 = Year(DTPicker2.Value)
m1 = Month(DTPicker1.Value)
m2 = Month(DTPicker2.Value)
d1 = Day(DTPicker1.Value)
d2 = Day(DTPicker2.Value)
Crys.SelectionFormula = \\\"{REGISTRO.Fecha} in Date (\\\" & Y1 & \\\",\\\" & m1 & \\\",\\\" & d1 & \\\") to Date (\\\" & Y2 & \\\",\\\" & m2 & \\\",\\\" & d2 & \\\")\\\"
Crys.Action = 1
End Sub
y me sale un error que dice: error \\\'20507\\\' en tiempo de ejecución: invalid file name.
Quisiera saber como lo arreglo o si hay otra forma de imprimir. Gracias.
Private Sub Command1_Click()
Crys.DataFiles(0) = App.Path + \\\"\\\\Mer.Mdb\\\"
Crys.ReportFileName = App.Path + \\\"\\\\Estadisticas.Rpt\\\"
Crys.Formulas(0) = \\\"DESDE=\\\'\\\" & DTPicker1.Value & \\\"\\\'\\\"
Crys.Formulas(1) = \\\"HASTA=\\\'\\\" & DTPicker2.Value & \\\"\\\'\\\"
Y1 = Year(DTPicker1.Value)
Y2 = Year(DTPicker2.Value)
m1 = Month(DTPicker1.Value)
m2 = Month(DTPicker2.Value)
d1 = Day(DTPicker1.Value)
d2 = Day(DTPicker2.Value)
Crys.SelectionFormula = \\\"{REGISTRO.Fecha} in Date (\\\" & Y1 & \\\",\\\" & m1 & \\\",\\\" & d1 & \\\") to Date (\\\" & Y2 & \\\",\\\" & m2 & \\\",\\\" & d2 & \\\")\\\"
Crys.Action = 1
End Sub
y me sale un error que dice: error \\\'20507\\\' en tiempo de ejecución: invalid file name.
Quisiera saber como lo arreglo o si hay otra forma de imprimir. Gracias.
Valora esta pregunta
0