En error GoTo ManipulaError
SQL = "SELECCIONAR * DESDE tbl_Pacientes DONDE Matricula = '" & Me.lstAlumnos & "'"
Establecer rst = CurrentDb.OpenRecordset (SQL, dbOpenForwardOnly)
Con la primera
Me.txtMatricula = txtMatricula
Me.txtBusqueda = txtBusqueda
Me.lstAlumnos = lstAlumnos
MsgBox (SQL)
MsgBox (lstAlumnos)
'MsgBox (txtMatricula)
DoCmd.OpenForm "FrmAntecedentesGinecoObstetricos", _
WhereCondition: = "Matricula =" & "Me.lstAlumnos"
Terminar con
rst.Close: Set rst = Nothing
Salir Sub
ManipulaError:
Si no, primero no hay nada, primero cierre: establezca primero = nada
MsgBox Err.Description, vbCritical, "Atencion"
End Sub
SQL = "SELECCIONAR * DESDE tbl_Pacientes DONDE Matricula = '" & Me.lstAlumnos & "'"
Con la primera
Establecer rst =
Salir Sub
Me.txtMatricula = txtMatricula Me.txtBusqueda = txtBusqueda Me.lstAlumnos = lstAlumnos
Me.txtMatricula = txtMatricula
Me.txtBusqueda = txtBusqueda
Me.lstAlumnos = lstAlumnos
Me.txtMatricula = rst!txtMatricula
Me.txtBusqueda = rst!txtBusqueda
Me.lstAlumnos = rst!lstAlumnos
Code:En error GoTo ManipulaError SQL = "SELECCIONAR * DESDE tbl_Pacientes DONDE Matricula = '" & Me.lstAlumnos & "'" Establecer rst = CurrentDb.OpenRecordset (SQL, dbOpenForwardOnly) Con la primera Me.txtMatricula = txtMatricula Me.txtBusqueda = txtBusqueda Me.lstAlumnos = lstAlumnos MsgBox (SQL) MsgBox (lstAlumnos) 'MsgBox (txtMatricula) DoCmd.OpenForm "FrmAntecedentesGinecoObstetricos", _ WhereCondition: = "Matricula =" & "Me.lstAlumnos" Terminar con rst.Close: Set rst = Nothing Salir Sub ManipulaError: Si no, primero no hay nada, primero cierre: establezca primero = nada MsgBox Err.Description, vbCritical, "Atencion" End Sub
Do Until rst.EOF
lngAgeRangeRelated = rst!AgeRangeRelated
rst.MoveNext
Loop