Option Compare Database
Option Explicit
Private Sub btnCalcular_Click()
On Error GoTo Err_btnCalcular
' 1. VALIDACIÓN DE SEGURIDAD EN CAMPOS DE ENTRADA
If IsNull([Link]) Then
MsgBox "Por favor, seleccione o registre un cliente válido antes de
calcular.", vbCritical, "Falta ID Cliente"
Exit Sub
End If
If IsNull([Link]) Or Trim([Link]) = "" Then
MsgBox "El campo 'Nombre Completo' es obligatorio para el análisis
alfanumérico.", vbExclamation, "Datos Incompletos"
Exit Sub
End If
If IsNull([Link]) Then
MsgBox "La 'Fecha de Nacimiento' es obligatoria para el mapa cronológico.",
vbExclamation, "Datos Incompletos"
Exit Sub
End If
' 2. DECLARACIÓN DE VARIABLES DE BASE DE DATOS (DAO)
Dim db As [Link]
Dim rs As [Link]
Dim strSQL As String
Dim lngClienteID As Long
Set db = CurrentDb
lngClienteID = [Link]
' 3. DECLARACIÓN DE VARIABLES DE TEXTO Y TRABAJO
Dim strNombre As String
Dim strFirma As String
Dim strLetra As String
Dim dteNac As Date
Dim i As Integer
Dim valPita As Integer
strNombre = UCase(Trim([Link]))
dteNac = [Link]
strFirma = strNombre
' 4. VALIDACIÓN DE CONTROL REGIONAL (CASTELLANO VS INTERNACIONAL)
Dim blnCastellano As Boolean
Dim ctrl As [Link]
blnCastellano = True
On Error Resume Next
Set ctrl = [Link]("chkOrigenCastellano")
If Not ctrl Is Nothing Then
blnCastellano = [Link]
End If
On Error GoTo Err_btnCalcular
' 5. DESGLOSE CRONOLÓGICO BASE DE LA FECHA
Dim dD As Integer
Dim dM As Integer
Dim dA As Integer
dD = Day(dteNac)
dM = Month(dteNac)
dA = Year(dteNac)
' 6. INICIALIZACIÓN DE MATRIZ PITAGÓRICA (FRECUENCIAS 1 AL 9)
Dim arrIndividualidad(1 To 9) As Integer
For i = 1 To 9
arrIndividualidad(i) = 0
Next i
Dim lngSumaVocales As Long
Dim lngSumaConsonantes As Long
lngSumaVocales = 0
lngSumaConsonantes = 0
' 7. LIMPIEZA EXPLÍCITA DE ACENTOS PARA EL PESAJE METAFÍSICO
Dim strNombreLimpio As String
strNombreLimpio = strNombre
strNombreLimpio = Replace(strNombreLimpio, "Á", "A")
strNombreLimpio = Replace(strNombreLimpio, "É", "E")
strNombreLimpio = Replace(strNombreLimpio, "Í", "I")
strNombreLimpio = Replace(strNombreLimpio, "Ó", "O")
strNombreLimpio = Replace(strNombreLimpio, "Ú", "U")
' 8. CICLO MAESTRO DE ANÁLISIS LETRA POR LETRA
For i = 1 To Len(strNombreLimpio)
strLetra = Mid(strNombreLimpio, i, 1)
' A. Clasificación Vocales / Consonantes (Metafísica)
If strLetra Like "[AEIOU]" Then
Select Case strLetra
Case "A": lngSumaVocales = lngSumaVocales + 1
Case "E": lngSumaVocales = lngSumaVocales + 5
Case "I": lngSumaVocales = lngSumaVocales + 9
Case "O": lngSumaVocales = lngSumaVocales + 6
Case "U": lngSumaVocales = lngSumaVocales + 3
End Select
ElseIf strLetra Like "[A-ZÑ]" Then
Select Case strLetra
Case "K": lngSumaConsonantes = lngSumaConsonantes + 11
Case "V": lngSumaConsonantes = lngSumaConsonantes + 22
Case "B", "T": lngSumaConsonantes = lngSumaConsonantes + 2
Case "C", "L": lngSumaConsonantes = lngSumaConsonantes + 3
Case "D", "M": lngSumaConsonantes = lngSumaConsonantes + 4
Case "F", "X": lngSumaConsonantes = lngSumaConsonantes + 6
Case "G", "P": lngSumaConsonantes = lngSumaConsonantes + 7
Case "H", "Q", "Z": lngSumaConsonantes = lngSumaConsonantes + 8
Case "J", "S": lngSumaConsonantes = lngSumaConsonantes + 1
Case "N", "Ñ", "W": lngSumaConsonantes = lngSumaConsonantes + 5
Case "R": lngSumaConsonantes = lngSumaConsonantes + 9
End Select
End If
' B. Mapeo Pitagórico e Individualidad (Internacional vs Castellano)
valPita = 0
If strLetra = "&" Then
valPita = 9
ElseIf blnCastellano = False Then
Select Case strLetra
Case "A", "J", "S": valPita = 1
Case "B", "K", "T": valPita = 2
Case "C", "L", "U": valPita = 3
Case "D", "M", "V": valPita = 4
Case "E", "N", "W", "Ñ": valPita = 5
Case "O", "X": valPita = 6
Case "G", "P", "Y": valPita = 7
Case "H", "Q", "Z": valPita = 8
Case "I", "R": valPita = 9
End Select
Else
Select Case strLetra
Case "A", "J", "R": valPita = 1
Case "B", "K", "S": valPita = 2
Case "C", "L", "T": valPita = 3
Case "D", "M", "U": valPita = 4
Case "E", "N", "V": valPita = 5
Case "F", "Ñ", "W": valPita = 6
Case "G", "O", "X": valPita = 7
Case "H", "P", "Y": valPita = 8
Case "I", "Q", "Z": valPita = 9
End Select
End If
If valPita >= 1 And valPita <= 9 Then
arrIndividualidad(valPita) = arrIndividualidad(valPita) + 1
End If
Next i
' 9. REDUCCIÓN DE VALORES METAFÍSICOS Y SENDERO DE VIDA
Dim intIdeal As Integer
Dim intLatente As Integer
Dim intSendero As Integer
intIdeal = [Link](lngSumaVocales)
intLatente = [Link](lngSumaConsonantes)
Dim lngSumaLineal As Long
Dim strFechaStr As String
lngSumaLineal = 0
strFechaStr = Format(dteNac, "ddmmyyyy")
For i = 1 To Len(strFechaStr)
lngSumaLineal = lngSumaLineal + Val(Mid(strFechaStr, i, 1))
Next i
intSendero = [Link](lngSumaLineal)
' 10. PROCESAMIENTO ALFANUMÉRICO DE LA CORRIENTE CALDEA
Dim lngSumaCaldea As Long
lngSumaCaldea = 0
For i = 1 To Len(strNombre)
lngSumaCaldea = lngSumaCaldea +
[Link](Mid(strNombre, i, 1))
Next i
' 11. CÁLCULO DE LA MATRIZ DE CINCO CUADRANTES OMKIN-KAY
Dim intOmkinC1 As Integer
Dim intOmkinC2 As Integer
Dim intOmkinC3 As Integer
Dim intOmkinC4 As Integer
Dim intOmkinC5 As Integer
intOmkinC1 = [Link](dD)
intOmkinC2 = [Link](dM)
intOmkinC3 = [Link](dA Mod 100)
Dim lngSumaAnio As Long
lngSumaAnio = (dA \ 1000) + ((dA \ 100) Mod 10) + ((dA \ 10) Mod 10) + (dA Mod
10)
intOmkinC4 = [Link](lngSumaAnio)
intOmkinC5 = [Link](dD + dM + intOmkinC4)
' LÓGICA DE COINCIDENCIAS Y ESPEJOS OMKIN-KAY
' Catálogo Dinámico de Coincidencias Omkin con Saltos de Línea Correctos
Dim strCoincidencias As String
strCoincidencias = ""
If intOmkinC1 = intOmkinC2 Then
strCoincidencias = strCoincidencias & "• C1=C2: Espejo de autenticidad.
Persona transparente sin máscaras; lo que es adentro es afuera." & vbCrLf
End If
' ADICIONAL: Validación de Espejo de Esencia y Don Divino (C1 = C3) por si
acaso
If intOmkinC1 = intOmkinC3 Then
strCoincidencias = strCoincidencias & "Don Florecido (Espejo C1 = C3): " & _
"Las virtudes del regalo cósmico están alineadas directamente con su esencia
innata." & vbCrLf
End If
If intOmkinC1 = intOmkinC4 Then
strCoincidencias = strCoincidencias & "• C1=C4: Repetición de vida. Se
traen cerca de 20 encarnaciones integrando la frecuencia; menor margen de error." &
vbCrLf
End If
If intOmkinC1 = intOmkinC5 Then
strCoincidencias = strCoincidencias & "• C1=C5: Misión de autoconocimiento.
El camino de evolución exige realizar conscientemente el poder interior." & vbCrLf
End If
If intOmkinC2 = intOmkinC3 Then
strCoincidencias = strCoincidencias & "• C2=C3: Desintegración del disfraz.
Al solicitar el regalo de Dios, las máscaras del Ego desaparecen." & vbCrLf
End If
' ALINEACIÓN ESTRICTA: Propósito de Vida / Línea de Congruencia (C2 = C4)
If intOmkinC2 = intOmkinC4 Then
strCoincidencias = strCoincidencias & "PROPÓSITO DE VIDA ACTIVO (Espejo C2 =
C4): " & _
"El consultante replica la conducta de su encarnación anterior. " & _
"Requiere continuidad inmediata de su maestría o corrección de estancamiento."
& vbCrLf
End If
If intOmkinC2 = intOmkinC5 Then
strCoincidencias = strCoincidencias & "• C2=C5: Personalidad impulsora. El
Ego se coloca al servicio del Propósito Superior de la vida." & vbCrLf
End If
If intOmkinC3 = intOmkinC5 Then
strCoincidencias = strCoincidencias & "• C3=C5: Consentido por el Creador.
Cumplirá su plan divino de forma fluida, sin obstáculos ni resistencias." & vbCrLf
End If
If intOmkinC4 = intOmkinC5 Then
strCoincidencias = strCoincidencias & "• C4=C5: Consolidación de
aprendizaje. Se trae el 70% integrado; se encarna para perfeccionar el 30% restante
de la maestría." & vbCrLf
End If
If strCoincidencias = "" Then
strCoincidencias = "Matriz Balanceada: No se detectan líneas de fricción ni
espejos de repetición karmática." & vbCrLf
End If
' 12. CÁLCULO DEL MAPA LINEAL ELEMENTAL TÁNTRICO
Dim intTanAlma As Integer
Dim intTanKarma As Integer
Dim intTanRegalo As Integer
Dim intTanDestino As Integer
Dim intTanVida As Integer
intTanAlma = [Link](dD)
intTanKarma = [Link](dM)
intTanRegalo = [Link](dA Mod 100)
intTanDestino = [Link](dA \ 100)
intTanVida = [Link](dD + dM + intTanRegalo)
' 13. MOTOR DE COMPATIBILIDAD DE LA FIRMA Y SEMÁFORO DEL DESTINO
Dim lngSumaFirma As Long
Dim intValFirma As Integer
Dim strLetraFirma As String
Dim j As Integer
Dim valPitaFirma As Integer
lngSumaFirma = 0
For j = 1 To Len(strFirma)
strLetraFirma = Mid(strFirma, j, 1)
valPitaFirma = 0
If strLetraFirma = "&" Then
valPitaFirma = 9
ElseIf blnCastellano = False Then
Select Case strLetraFirma
Case "A", "J", "S": valPitaFirma = 1
Case "B", "K", "T": valPitaFirma = 2
Case "C", "L", "U": valPitaFirma = 3
Case "D", "M", "V": valPitaFirma = 4
Case "E", "N", "W", "Ñ": valPitaFirma = 5
Case "O", "X": valPitaFirma = 6
Case "G", "P", "Y": valPitaFirma = 7
Case "H", "Q", "Z": valPitaFirma = 8
Case "I", "R": valPitaFirma = 9
End Select
Else
Select Case strLetraFirma
Case "A", "J", "R": valPitaFirma = 1
Case "B", "K", "S": valPitaFirma = 2
Case "C", "L", "T": valPitaFirma = 3
Case "D", "M", "U": valPitaFirma = 4
Case "E", "N", "V": valPitaFirma = 5
Case "F", "Ñ", "W": valPitaFirma = 6
Case "G", "O", "X": valPitaFirma = 7
Case "H", "P", "Y": valPitaFirma = 8
Case "I", "Q", "Z": valPitaFirma = 9
End Select
End If
lngSumaFirma = lngSumaFirma + valPitaFirma
Next j
intValFirma = [Link](lngSumaFirma)
Dim strSemaforoEstado As String
Dim strSemaforoExplicacion As String
strSemaforoEstado = "VERDE"
strSemaforoExplicacion = "Firma Armónica. Las vivencias elegidas expanden el
potencial del destino de nacimiento."
Select Case intValFirma
Case 1
If intSendero = 3 Or intSendero = 6 Or intSendero = 7 Or intSendero = 8
Then
strSemaforoEstado = "AMARILLO"
strSemaforoExplicacion = "Advertencia de Contradicción: La firma
genera tensiones o bloqueos con senderos de vibración 3, 6, 7 u 8."
End If
Case 2
If intSendero = 4 Or intSendero = 8 Then
strSemaforoEstado = "AMARILLO"
strSemaforoExplicacion = "Firma Discordante: Entra en contradicción
directa con la estructura y fuerza material del 4 y el 8."
End If
Case 3
If intSendero = 1 Then
strSemaforoEstado = "ROJO"
strSemaforoExplicacion = "Incompatibilidad Total: La vibración de
expansión artística de esta firma bloquea la independencia nativa del Sendero 1."
ElseIf intSendero = 3 Then
strSemaforoEstado = "AMARILLO"
strSemaforoExplicacion = "Riesgo de Dispersión: Duplicación de
frecuencia 3. Tendencia marcada a fallos humanos o superficialidad."
End If
Case 4
If intSendero = 2 Or intSendero = 8 Or intSendero = 9 Then
strSemaforoEstado = "ROJO"
strSemaforoExplicacion = "Contradicción de Personalidad Crítica:
Choque estructural severo con la naturaleza del nacimiento."
End If
Case 5
If intSendero = 7 Or intSendero = 8 Or intSendero = 9 Then
strSemaforoEstado = "AMARILLO"
strSemaforoExplicacion = "Conflicto de Tránsito: Incrementa la
impaciencia y genera fricciones en el entorno laboral o de convivencia."
End If
End Select
' 14. SEGMENTACIÓN DE LOS 7 BLOQUES DE APTITUDES CONDUCTUALES
Dim bMen As Integer, bEmo As Integer, bInt As Integer, bArt As Integer
Dim bCie As Integer, bNeg As Integer, bFis As Integer
bMen = arrIndividualidad(1) + arrIndividualidad(7) + arrIndividualidad(8) +
arrIndividualidad(9)
bEmo = arrIndividualidad(2) + arrIndividualidad(3) + arrIndividualidad(6) +
arrIndividualidad(9)
bInt = arrIndividualidad(2) + arrIndividualidad(7) + arrIndividualidad(9)
bArt = arrIndividualidad(3) + arrIndividualidad(6) + arrIndividualidad(9)
bCie = arrIndividualidad(1) + arrIndividualidad(4) + arrIndividualidad(7) +
arrIndividualidad(8) + arrIndividualidad(9)
bNeg = arrIndividualidad(2) + arrIndividualidad(4) + arrIndividualidad(8)
bFis = arrIndividualidad(4) + arrIndividualidad(5) + arrIndividualidad(8)
' 15. CÁLCULO E INYECCIÓN DE LA MATRIZ DEL YANTRA VÉDICO
Dim Y(1 To 9) As Integer
Y(1) = [Link](dD)
Y(2) = [Link](dM)
Y(3) = [Link](dA)
Y(4) = [Link](Y(1) + Y(2))
Y(5) = [Link](Y(2) + Y(3))
Y(6) = [Link](Y(4) + Y(5))
Y(7) = [Link](Y(1) + Y(4))
Y(8) = [Link](Y(3) + Y(5))
Y(9) = [Link](Y(7) + Y(8))
' 16. PERSISTENCIA DE DATOS EN TABLAS RELACIONALES (DAO)
strSQL = "SELECT * FROM tblResMetafisica WHERE IDCliente = " & lngClienteID
Set rs = [Link](strSQL, dbOpenDynaset)
If [Link] Then
[Link]
rs!IDCliente = lngClienteID
Else
[Link]
End If
rs!DeseoAnimico_Ideal = intIdeal
rs!SerLatente_Expresion = intLatente
rs!SenderoVida = intSendero
rs!VibracionActual = "Tránsito Activo"
[Link]
[Link]
strSQL = "SELECT * FROM tblResCaldea WHERE IDCliente = " & lngClienteID
Set rs = [Link](strSQL, dbOpenDynaset)
If [Link] Then
[Link]
rs!IDCliente = lngClienteID
Else
[Link]
End If
rs!NumeroCompuesto = lngSumaCaldea
rs!VibracionNombre = [Link](lngSumaCaldea)
rs!CompatibilidadFirma = strSemaforoEstado
[Link]
[Link]
strSQL = "SELECT * FROM tblResOmkinKay WHERE IDCliente = " & lngClienteID
Set rs = [Link](strSQL, dbOpenDynaset)
If [Link] Then
[Link]
rs!IDCliente = lngClienteID
Else
[Link]
End If
rs!Cuadrante1_Esencia = intOmkinC1
rs!Cuadrante2_Personalidad = intOmkinC2
rs!Cuadrante3_Regalo = intOmkinC3
rs!Cuadrante4_VidasPasadas = intOmkinC4
rs!Cuadrante5_Mision = intOmkinC5
[Link]
[Link]
strSQL = "SELECT * FROM tblResTantrica WHERE IDCliente = " & lngClienteID
Set rs = [Link](strSQL, dbOpenDynaset)
If [Link] Then
[Link]
rs!IDCliente = lngClienteID
Else
[Link]
End If
rs!FactorAlma = intTanAlma
rs!FactorKarma = intTanKarma
rs!FactorRegalo = intTanRegalo
rs!FactorDestino = intTanDestino
rs!FactorVida = intTanVida
[Link]
[Link]
' 17. VOLCADO Y MAPEO DE DATOS A CONTROLES DEL FORMULARIO VISIBLE
[Link] = intIdeal
[Link] = intLatente
[Link] = intSendero
[Link] = lngSumaCaldea
[Link] = [Link](lngSumaCaldea)
' Corrección de Uso Mixto: Se asigna el estado al control Metafísico y el valor a
la Firma
[Link] = "Tránsito Activo"
[Link] = intValFirma
[Link] = strSemaforoEstado
' Asignación de la Matriz Omkin-Kay a sus cuadros de texto nativos
Me.Cuadrante1_Esencia = intOmkinC1
Me.Cuadrante2_Personalidad = intOmkinC2
Me.Cuadrante3_Regalo = intOmkinC3
Me.Cuadrante4_VidasPasadas = intOmkinC4
Me.Cuadrante5_Mision = intOmkinC5
' Nota: Asignación del Año Emocional en control secundario protegido
On Error Resume Next
[Link]("txtAnioEmocional").Value = [Link](intOmkinC5
+ Year(Date))
On Error GoTo Err_btnCalcular
' Volcado del catálogo dinámico de coincidencias y explicaciones del semáforo
[Link] = strCoincidencias & vbCrLf & "Semáforo (" &
strSemaforoEstado & "): " & strSemaforoExplicacion
' NOTA: Asegúrese de renombrar o crear estos controles en la vista diseño del
formulario
[Link] = intTanAlma
[Link] = intTanKarma
[Link] = intTanRegalo
[Link] = intTanDestino
[Link] = intTanVida
' Carga de conteos en los 7 bloques conductuales de la interfaz
[Link] = bMen
[Link] = bEmo
[Link] = bInt
[Link] = bArt
[Link] = bCie
[Link] = bNeg
[Link] = bFis
' Volcado físico en las casillas numéricas de la cuadrícula del Yantra Védico
Me.txtY1 = Y(1)
Me.txtY2 = Y(2)
Me.txtY3 = Y(3)
Me.txtY4 = Y(4)
Me.txtY5 = Y(5)
Me.txtY6 = Y(6)
Me.txtY7 = Y(7)
Me.txtY8 = Y(8)
Me.txtY9 = Y(9)
' =========================================================================
' CARGA AUTOMÁTICA CORREGIDA DE INTERPRETACIONES ADJUNTAS (DOCTRINAS REALES)
' =========================================================================
' 1. Bloque Metafísico y Pitagórico (Busca Arquetipos del 1 al 9)
Me.txtIdeal_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & intIdeal), "Número Maestro / Frecuencia Tránsito")
Me.txtLatente_Interp = Nz(DLookup("ArquetipoNombre",
"tblMaeSignificadosNumericos", "Numero = " & intLatente), "Número Maestro /
Frecuencia Tránsito")
Me.txtSendero_Interp = Nz(DLookup("ArquetipoNombre",
"tblMaeSignificadosNumericos", "Numero = " & intSendero), "Vibración de Sendero de
Vida")
' 2. Bloque de la Matriz Tántrica (Usa el catálogo general de rasgos positivos del
1 al 9)
Me.txtAlma_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = " &
intTanAlma), "Interpretación Tántrica en análisis")
Me.txtKarma_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = " &
intTanKarma), "Interpretación Tántrica en análisis")
Me.txtRegalo_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = "
& intTanRegalo), "Interpretación Tántrica en análisis")
Me.txtDestino_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = "
& intTanDestino), "Interpretación Tántrica en análisis")
Me.txtVida_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = " &
intTanVida), "Interpretación Tántrica en análisis")
' 3. Bloque de los 5 Cuadrantes Omkin-Kay (Filtro limpio directo por número
absoluto)
Me.txtOmkinC1_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = "
& intOmkinC1), "Cargando factor Omkin-Kay...")
Me.txtOmkinC2_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = "
& intOmkinC2), "Cargando factor Omkin-Kay...")
Me.txtOmkinC3_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = "
& intOmkinC3), "Cargando factor Omkin-Kay...")
Me.txtOmkinC4_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = "
& intOmkinC4), "Cargando factor Omkin-Kay...")
Me.txtOmkinC5_Interp = Nz(DLookup("AspectoPositivo", "tblMaeOmkinKay", "Numero = "
& intOmkinC5), "Cargando factor Omkin-Kay...")
' =========================================================================
' CARGA AUTOMÁTICA DE INTERPRETACIONES ADJUNTAS PARA EL YANTRA VÉDICO
' =========================================================================
Me.txtY1_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(1)), "Análisis Védico")
Me.txtY2_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(2)), "Análisis Védico")
Me.txtY3_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(3)), "Análisis Védico")
Me.txtY4_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(4)), "Análisis Védico")
Me.txtY5_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(5)), "Análisis Védico")
Me.txtY6_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(6)), "Análisis Védico")
Me.txtY7_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(7)), "Análisis Védico")
Me.txtY8_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(8)), "Análisis Védico")
Me.txtY9_Interp = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & Y(9)), "Análisis Védico")
' =========================================================================
' DIAGNÓSTICO DINÁMICO DE INTENSIDAD PARA LOS 7 EJES CONDUCTUALES
' =========================================================================
' 1. Eje Mental
If bMen = 0 Then
Me.txtMental_Interp = "Ausencia de enfoque lógico; opera por impulso."
ElseIf bMen >= 1 And bMen <= 3 Then
Me.txtMental_Interp = "Pensamiento racional equilibrado, pragmático y objetivo."
Else
Me.txtMental_Interp = "Exceso mental: Racionalización obsesiva, dudas y parálisis
por análisis."
End If
' 2. Eje Emocional
If bEmo = 0 Then
Me.txtEmocional_Interp = "Frialdad afectiva o dificultad para expresar
sentimientos."
ElseIf bEmo >= 1 And bEmo <= 3 Then
Me.txtEmocional_Interp = "Inteligencia emocional sana, empática y cordial."
Else
Me.txtEmocional_Interp = "Hipersensibilidad: Fluctuaciones emocionales intensas y
drama."
End If
' 3. Eje Intuitivo
If bInt = 0 Then
Me.txtIntuitivo_Interp = "Desconexión de corazonadas; se apoya solo en lo
tangible."
ElseIf bInt >= 1 And bInt <= 2 Then
Me.txtIntuitivo_Interp = "Percepción sutil activa, confía en su guía interior."
Else
Me.txtIntuitivo_Interp = "Hiperelemento intuitivo: Tendencia al escapismo o
fantasía."
End If
' 4. Eje Artístico
If bArt = 0 Then
Me.txtArtistico_Interp = "Falta de interés por la estética o la autoexpresión."
ElseIf bArt >= 1 And bArt <= 2 Then
Me.txtArtistico_Interp = "Sentido estético natural, gusto por el arte y el
diseño."
Else
Me.txtArtistico_Interp = "Ego artístico sobrecargado: Búsqueda excesiva de
atención o vanidad."
End If
' 5. Eje Científico
If bCie = 0 Then
Me.txtCientifico_Interp = "Poco apego al método; prefiere la improvisación."
ElseIf bCie >= 1 And bCie <= 4 Then
Me.txtCientifico_Interp = "Mente analítica XML estructurada, excelente
investigador."
Else
Me.txtCientifico_Interp = "Rigidez científica: Dogmatismo extremo y desconfianza."
End If
' 6. Eje de Negocios
If bNeg = 0 Then
Me.txtNegocios_Interp = "Dificultad para el cobro o desinterés en el poder
material."
ElseIf bNeg >= 1 And bNeg <= 3 Then
Me.txtNegocios_Interp = "Visión comercial excelente, apto para finanzas y mando."
Else
Me.txtNegocios_Interp = "Obsesión material: Codicia o control excesivo del
dinero."
End If
' 7. Eje Físico
If bFis = 0 Then
Me.txtFisico_Interp = "Tendencia al sedentarismo; baja energía corporal vital."
ElseIf bFis >= 1 And bFis <= 3 Then
Me.txtFisico_Interp = "Fuerza vital óptima, dinamismo y resistencia física."
Else
Me.txtFisico_Interp = "Hiperactividad corporal: Agotamiento o impulsividad
motora."
End If
[Link]
MsgBox "Procesamiento matemático holístico completado. Las tablas relacionales han
sido actualizadas.", vbInformation, "Cálculo Completado"
Exit_btnCalcular:
Set rs = Nothing
Set db = Nothing
Exit Sub
Err_btnCalcular:
MsgBox "Error en la ejecución del Motor de Cálculos: " & [Link],
vbCritical, "Error " & [Link]
Resume Exit_btnCalcular
End Sub
' 18. EVENTO CORREGIDO PARA CARGAR INTERPRETACIONES AL CAMBIAR REGISTRO
Private Sub Form_Current()
On Error Resume Next
' REGLA DE ORO: Si no hay ID de cliente válido, se limpia todo y se detiene
la ejecución
If IsNull([Link]) Or [Link] = 0 Then
GoTo LimpiarTodoAbsoluto
End If
' SEGUNDO FILTRO: Si el cliente existe pero NO tiene cálculos previos en la
tabla maestra,
' significa que es un registro nuevo. No debemos simular datos en pantalla.
If IsNull([Link]) Or [Link] = 0 Then
GoTo LimpiarTodoAbsoluto
End If
' -------------------------------------------------------------------------
' SOLO SI EL CLIENTE YA TIENE UN ESTUDIO REALIZADO Y GUARDADO PREVIAMENTE:
Dim metaEvaluar As Integer
Dim arqNombre As String
Dim sigGeneral As String
Dim planeta As String
Dim consejo As String
Dim idClienteActual As Long
idClienteActual = [Link]
' Recuperación del valor numérico de la firma desde la tabla Caldea
' Esto elimina el uso mixto de la variable de estado
[Link] = Nz(DLookup("NumeroCompuesto", "tblResCaldea", "IDCliente
= " & idClienteActual), 0)
If [Link] > 0 Then
' Reduce el número compuesto de la firma a dígito raíz para la pantalla
[Link] =
[Link]([Link])
End If
' Captura el número raíz calculado en el control Ideal de la pantalla
metaEvaluar = Nz([Link], 0)
' Si existe un cálculo válido, ejecuta las búsquedas de arquetipos
If metaEvaluar > 0 Then
' Búsquedas seguras con DLookup en la tabla maestra poblada
arqNombre = Nz(DLookup("ArquetipoNombre", "tblMaeSignificadosNumericos",
"Numero = " & metaEvaluar), "Buscador Evolutivo")
sigGeneral = Nz(DLookup("SignificadoGeneral",
"tblMaeSignificadosNumericos", "Numero = " & metaEvaluar), "Interpretación en
proceso de análisis.")
planeta = Nz(DLookup("PlanetaRegente", "tblMaeSignificadosNumericos",
"Numero = " & metaEvaluar), "Planeta de Tránsito")
consejo = Nz(DLookup("RecomendacionEvol", "tblMaeSignificadosNumericos",
"Numero = " & metaEvaluar), "Canalizar la energía hacia el crecimiento personal.")
' Volcado físico y refresco de los controles en pantalla
[Link] = arqNombre
[Link] = sigGeneral
[Link] = "?? Planeta Regente: " & planeta & vbCrLf & vbCrLf &
"?? Guía de Evolución: " & consejo
' Muestra de forma limpia el estado predeterminado del ciclo metafísico
[Link] = "Tránsito Activo"
Else
GoTo LimpiarTodoAbsoluto
End If
Exit Sub
' AGREGAR ESTO JUSTO ANTES DE 'END SUB':
LimpiarTodoAbsoluto:
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
End Sub
' 19. EVENTO PARA EXPORTAR EL REPORTE DEL CONSULTANTE EN PDF
Private Sub btnImprimirPDF_Click()
On Error GoTo Err_Imprimir
If IsNull([Link]) Then Exit Sub
[Link] "rptEstudioEspecialistaCompleto", acViewPreview, , "IDCliente
= " & [Link]
Exit Sub
Err_Imprimir:
MsgBox "No se pudo abrir el informe. Verifique que exista el objeto
'rptEstudioEspecialistaCompleto'.", vbExclamation, "Aviso"
End Sub