
Hola a todos,este funcion me va bien pero como tengo que estar desarrollando otro proyecto tengo que volver a rehacerlo a razon que cambian los que se desea ver en los controles de texto, aveces son siete en otras veces son 11 , pretendo tenerlo en un modulo de clase y solo llamarlo.
Codigo
-------------------------------------------------
Function VerificaR(xSW As Boolean)
If txtNombre = "" Then
MsgBox " Falta ingresar el MONBRE ", vbCritical, "Error al ingresar Datos"
txtNombre.SetFocus
xSW = True
Exit Function
End If
If txtApellido = "" Then
MsgBox " Falta ingresar elAPELLIDO ", vbCritical, "Error al ingresar Datos"
txtApellido.SetFocus
xSW = True
Exit Function
End If
If txtDireccion = "" Then
MsgBox " Falta ingresar el DIRECCION ", vbCritical, "Error al ingresar Datos"
txtDireccion.SetFocus
xSW = True
Exit Function
End If
If txtTelefono = "" Then
MsgBox " Falta ingresar el TELEFONO ", vbCritical, "Error al ingresar Datos"
txtTelefono.SetFocus
xSW = True
Exit Function
End If
If txtDNI = "" Then
MsgBox " Falta ingresar el DNI ", vbCritical, "Error al ingresar Datos"
txtDNI.SetFocus
xSW = True
Exit Function
End If
If txtEMail = "" Then
MsgBox " Falta ingresar el EMail ", vbCritical, "Error al ingresar Datos"
txtEMail.SetFocus
xSW = True
Exit Function
End If
End Function
----------------------------------------------------------------------------
Si se fijan los text no son array, intente con controles array el probles es que no puedo usar la cabesera de la base de datos estan escrito por ejemplo asi Nom_cli, Ape_cli, etc, etc.
lo ideal seria usar controles array pero que funcione en modulo de clase como la funcion descrita en el codigo y nose como hacer, gracias de ante mano