
Unir dos códigos
Publicado por Francesc (68 intervenciones) el 19/09/2013 21:02:29
Buenas noches,
Tengo un problemilla que no se resolver ni por donde empezar. Me explico, en informes distintos al dar formato en la sección de detalle ejecuto cada uno en un informe distinto y ahora me surge la necesidad de aplicar ambos en un informe sólo. Los códigos son:
El primero:
Private Sub Detalle_Format(Cancel As Integer, FormatCount As Integer)
Dim RutaFoto As String
If Len(Nz(NUMSOCI, "")) = 0 Then Imagen23.Picture = "": Exit Sub
RutaFoto = "C:\Users\Francesc\Documents\My eBooks\EsplaiDeLaGentGranD'Ocata\Fotos\" & NUMSOCI & ".jpg"
Imagen23.Picture = IIf(Dir(RutaFoto) <> "", RutaFoto, "")
End Sub
El segundo:
Private Sub Detalle_Format(Cancel As Integer, FormatCount As Integer)
If Left(Me![Tel], 2) = "93" Or Left(Me![Tel], 3) = "972" Then
Tel.InputMask = "## ### ## ##"
Fax.InputMask = "## ### ## ##"
Else
Tel.InputMask = "### ## ## ##"
Fax.InputMask = "### ## ## ##"
End If
End Sub
Muchas gracias por la ayudan que prestan.
Tengo un problemilla que no se resolver ni por donde empezar. Me explico, en informes distintos al dar formato en la sección de detalle ejecuto cada uno en un informe distinto y ahora me surge la necesidad de aplicar ambos en un informe sólo. Los códigos son:
El primero:
Private Sub Detalle_Format(Cancel As Integer, FormatCount As Integer)
Dim RutaFoto As String
If Len(Nz(NUMSOCI, "")) = 0 Then Imagen23.Picture = "": Exit Sub
RutaFoto = "C:\Users\Francesc\Documents\My eBooks\EsplaiDeLaGentGranD'Ocata\Fotos\" & NUMSOCI & ".jpg"
Imagen23.Picture = IIf(Dir(RutaFoto) <> "", RutaFoto, "")
End Sub
El segundo:
Private Sub Detalle_Format(Cancel As Integer, FormatCount As Integer)
If Left(Me![Tel], 2) = "93" Or Left(Me![Tel], 3) = "972" Then
Tel.InputMask = "## ### ## ##"
Fax.InputMask = "## ### ## ##"
Else
Tel.InputMask = "### ## ## ##"
Fax.InputMask = "### ## ## ##"
End If
End Sub
Muchas gracias por la ayudan que prestan.
Valora esta pregunta


0