Anda di halaman 1dari 252

UNIVERSIDAD TCNICA DE MANAB

Facultad de Ciencias Informticas

TESIS DE GRADO
Previa a la Obtencin del Ttulo de:

TECNLOGO PROGRAMADOR
TEMA: Desarrollar un Sistema Informtico de Ingreso de Matriculas y Control de Notas para la Escuela Fiscal Mixta Portete de Tarqui de la Parroquia Coln, Ciudad de Portoviejo

AUTOR:

Jos Gabriel Macias Zambrano


DIRECTOR DE TESIS:

Ing. Iraida Santana Portoviejo - Manab - Ecuador 2010

NDICE GENERAL

PGUINAS PRELIMINARES CERTIFICACIN APROBACIN DECLARACIN DE AUTORA AGRADECIMIENTO DEDICATORIA RESUMEN EJECUTIVO EXECUTIVE SUMMARY INTRODUCCIN I II III IV V VI VII

CAPTULO I 1.1. JUSTIFICACIN . 2 3 3 4 4 4 4 5 5 5

1.2. PLANTEAMIENTO DEL PROBLEMA 1.3. FORMULACIN DEL PROBLEMA 1.4. DELIMITACIN DEL PROBLEMA 1.5. OBJETIVOS 1.5.1. OBJETIVO GENERAL 1.5.2. OBJETIVO ESPECFICO 1.6. BENEFICIARIOS 1.6.1. DIRECTOS 1.6.2. INDIRECTOS

CAPTULO II 2.1. MARCO CONCEPTUAL 2.1.1. MARCO REFERENCIAL 2.2. MARCO TERICO 6 6 8

CAPTULO III 3.1. DISEO METODOLGICO 3.1.1. MTODOS 18 18

3.1.2. TCNICAS 3.1.3. INSTRUMENTOS 3.2. RECURSOS 3.2.1. RECURSOS HUMANOS 3.2.2. RECURSOS MATERIALES 3.2.3. RECURSOS TECNOLGICOS 3.2.4. RECURSOS TCNICOS 3.2.5. RECURSOS INSTITUCIONALES 3.2.6. RECURSOS ECONMICOS 3.3. PRESUPUESTO

18 18 19 19 19 19 19 20 20 21

CAPTULO IV 4.1. CONCLUSIONES 4.2. RECOMENDACIONES 22 22

CAPITULO V 5.1. DESCRIPCIN GENERAL DEL SISTEMA 5.2. DETERMINACIN DE REQUERIMIENTOS 5.3. RELACIONES EXISTENTES DE LA BASE DE DATO 5.4. DISEOS DE MODULOS 5.5. CRONOGRAMA VALORADO BIBLIOGRAFA 24 25 26 27 28 29

CERTIFICACIN

Ing. Iraida Santana, certifica que la presente tesis ha sido elaborada por el Sr. Jos Gabriel Macias Zambrano; bajo mi direccin, control y seguimiento. El presente trabajo rene los requisitos de una investigacin y programacin concluida mediante el esfuerzo, dedicacin y constancia; tanto en parte terica, investigativa y practica, lo que permite otorgar su originalidad.

Para constancia y validez, firmo el documento.

Atentamente,

Ing. Iraida Santana DIRECTORA DE TESIS

UNIVERSIDAD TCNICA DE MANAB


FACULTAD DE CIENCIAS INFORMTICAS
ESCUELA DE COMPUTACIN

TEMA:
Desarrollar un Sistema Informtico de Ingreso de Matriculas y Control de Notas para la Escuela Fiscal Mixta Portete de Tarqui de la Parroquia Coln, Ciudad de Portoviejo

TESIS DE GRADO
Sometida a consideracin del Tribunal de Revisin y Sustentacin, legalizada por el Honorable Consejo Directivo como requisito previo a la obtencin del Titulo de:

TECNLOGO PROGRAMADOR APROBADA POR:

Ing. Mercedes Cedeo Palma

Ing. Rosa Ins Rivadeneira

Ing. Christian Torres Moran

DECLARACIN DE AUTORA

Jos Gabriel Macias Zambrano, declar que la presente tesis constituye requisito previo la obtencin del ttulo de Tecnlogo Programador bajo la supervisin de la Ing. Iraida Santana

Autoriz al centro de informacin de la Universidad para que el presente trabajo se convierta en un documento de lectura, de acuerdo a los requisitos establecidos por la institucin. Finalmente expres que el presente trabajo investigativo ha sido de mi autora, razn por la cual cedo los derechos a la Universidad Tcnica de Manab.

Jos Macias Autor

AGRADECIMIENTO

Primeramente agradezco; dios por darme la vida, el que est sobre todo y ante todo ya que nunca me desampara en ningn momento, tambin un eterno agradecimiento a esta prestigiosa universidad la cual abre sus puertas a jvenes como nosotros, preparndonos para un futuro competitivo y formndonos como personas de bien.

En la vida hay momentos de cambios donde hay que tomar decisiones y emprender nuevos propsitos. Yo estoy en ese instante de cambio, evolucin, aprendizaje y superacin gracias a mis padres, mi esposa y la empresa en la que laboro merecedores de mi agradecimiento, ellos que me brindaron todo el apoyo y la paciencia necesaria para culminar mi carrera.

DEDICATORIA

Dedico este proyecto de tesis a Dios, a mis padres y mi esposa e hijo. A Dios porque ha estado conmigo a cada paso que doy, cuidndome y dndome fortaleza para continuar, a mis padres, quienes a lo largo de mi vida han velado por mi bienestar y educacin siendo mi apoyo en todo momento, a mi esposa y mi hijo que han depositado su entera confianza en cada reto que se me presentaba sin dudar ni un solo momento en mi inteligencia y capacidad. Es por eso que quiero que sepan y tengan siempre presente que no hay obstculo capaz de imponerse; si queremos podemos llegar ms lejos, si queremos podemos llegar ms alto, si queremos podemos hacer lo que sea solo hay que proponrselo.

Es por ellos que soy lo que soy ahora. Los amo con mi vida.

RESUMEN EJECUTIVO
En la actualidad todas las instituciones pblicas o privadas no pueden prescindir de los adelantos tecnolgicos, la informtica se ha vuelto una herramienta indispensable para el desarrollo y servicio a la comunidad.

Toda la informacin recopilada que sirvi como argumento para respaldar este programa, se basa en cinco aos de observaciones a los problemas vividos a diario en est escuela por la falta de un sistema basado en un software de fcil manejo, el que dar un cambio total a la atencin en este lugar que presta tanto servicios a la comunidad de Portoviejo.

Este sistema ser un soporte indispensable para la administracin de la informacin de est escuela.

Dicho programa informtico desarrollado en la siguiente tesis cumple con las caractersticas de normatividad en aplicaciones de escritorio. Posee adems factibilidad justificada en su totalidad y respaldada econmicamente, cuyo detalle estn en el presente informe.

EXECUTIVE SUMMARY

As of the present moment all public or private institutions can not do without technological advances, information technology has become an indispensable tool for development and community service.

All compiled information that was useful for arguendo backing this program, is based on five years of observations to the problems enjoyed every day in the school is in favor of the lack of a system based in a user-friendly software, the one that will give a total change to attention in this place that gives help so much to Portoviejo's community.

This system will be an indispensable support for the administration of the information of the school is .

Saying programs information-technology developed in the following thesis he fulfills normatividad's characteristics in applications of desk. He possesses besides feasibility justified completely and backed economically, whose detail they are in the present report.

10

INTRODUCCIN
Desde su aparicin los sistemas informticos se han convertido en una herramienta valiosa en el campo empresarial gracias a su fcil manejo, a su seguridad mediante su clave de acceso y por su gran capacidad de almacenamiento de datos.

Los registros de toda la informacin que generan en la Escuela Fiscal Mixta Portete de Tarqui, se recopilan y se organizan de forma automtica sujeta sin errores, reduciendo espacio de acuerdo al nivel de almacenamiento de dichos documentos y sin prdida de tiempo.

Ante los problemas que tenia la Escuela, se plante como propuesta realizar una base de datos que permitiera obtener, el registro y control de las matriculas y notas para gestionar los datos de la informacin de una forma rpida, fcil, adecuada, en orden y actualizada que conlleve a un mejoramiento educacional brindando un mejor rendimiento y desempeo en las actividades que se realiza, conociendo nuevas opciones y oportunidades al ser implementado el sistema como alternativa de solucin y todo esto fue realizado dando resultados excelentes para el bien de la institucin y de la comunidad.

Este sistema informtico es una herramienta de apoyo eficiente, que permite automatizar y obtener datos exactos, adems es muy importante y trascendental, en el contexto socioeconmico y poltico, esto permite tener mayor facilidad para el manejo de la informacin.

11

CAPTULO I

1.1. JUSTIFICACIN Despus de haber realizado las investigaciones en la Escuela Fiscal Mixta "Portete de Tarqui" se determin que con el aumento de estudiantes en los ltimos aos se registr una gran cantidad de informacin por parte del departamento de secretara estos procesos se realizaban sin mecanismos adecuados que agilicen, garanticen y organicen la informacin de manera segura sin riesgo de perdida o alteracin de la informacin de los estudiantes, por est razn se consider que el desarrollo del Sistema Informtico es de fundamental importancia para la institucin Educativa, logrando brindar servicios modernos y actualizados a quienes lo soliciten.

La implementacin del sistema se la planteo a la Escuela con la finalidad de mejorar sus servicios para el mismo plantel educativo y brindar la informacin de una forma rpida moderna y actualizada que conlleve a un mejoramiento institucional y as elevar estndares de calidad. Durante el tiempo de estudios realizados se han asimilado los conocimientos impartidos por excelentes catedrticos; su dedicacin por formar estudiantes emprendedores y capacitados para vencer nuevos retos, no ha sido en vano, ya que se venci uno de ellos, que es la finalizacin de est proyecto que sirvi de sostn a ideales afines.

Con la culminacin del sistema se ahorro tiempo y dinero; y al ingresar la informacin se evit la realizacin de reportes y clculos manuales. La finalizacin

12

del proyecto servio como gua para los estudiantes aportando nuevos conocimientos respecto a los sistemas informticos.

1.2. PLANTEAMIENTO DEL PROBLEMA

Los procesos que se realizan en la Escuela Fiscal Mixta Portete de Tarqui son muy rpidos, reduciendo espacio, perdida de la informacin y la prdida de tiempo al momento de realizar el proceso de forma manual, ya que tienen los medios necesario para apresurar el trabajo por est razn se implement el sistema informtico.

En est Institucin Educativa resulto productivo, ya que se evit la aglomeracin y acumulacin de los datos de las matriculas y notas, y as se brind una mejor atencin, se realizan ajustes satisfactorios que son beneficiosos para la institucin y la comunidad.

1.3. FORMULACIN DEL PROBLEMA

Cmo incide la implementacin de un Sistema Informtico de ingreso de Matriculas y control de Notas para la Escuela Fiscal Mixta Portete de Tarqui?

13

1.4. DELIMITACIN DEL PROBLEMA

La presente tesis se llevo a cabo en la Escuela Fiscal Mixta "Portete de Tarqui", ubicado en la Parroquia Coln de la ciudad de Portoviejo provincia de Manab en el periodo 2009 - 2010.

1.5. OBJETIVOS

1.5.1. OBJETIVO GENERAL

Mejorar los procesos mediante la implementacin de un sistema informtico para llevar los registros de Matriculas y control de Notas para la Escuela Fiscal Mixta "Portete de Tarqui", de la Parroquia Coln de la ciudad de Portoviejo provincia de Manab.

1.5.2. OBJETIVO ESPECFICO Crear registros que contengan los datos de los estudiantes Obtener en orden y actualizada la informacin de datos personales de los estudiantes Controlar el ingreso de las notas de los trimestres Controlar de manera eficaz las inscripciones de matriculas para cada uno de los estudiantes Capacitar al personal en el manejo de la nueva informacin que presentar el sistema Tener un mejor control en la organizacin de los documentos

14

Permitir la obtencin inmediata de reportes de matriculas y notas

1.6. BENEFICIARIOS

1.6.1. DIRECTOS

Al implementar est sistema informtico los beneficiarios directos sern las personas que acuden a la Escuela Fiscal Mixta Portete de Tarqui.

1.6.2. INDIRECTOS

La comunidad de la parroquia Coln de la ciudad de Portoviejo.

15

CAPTULO II

2.1. MARCO CONCEPTUAL

2.1.1. MARCO REFERENCIAL

HISTORIA

La informtica se est introduciendo en nuestra actividad diaria de un modo vertiginoso y est siendo una necesidad conocerla y utilizarla bien como usuario o como profesionales.

Lo primero que se debe plantear una persona interesada en esta materia y que se quiera introducir en el mundo de la informtica es conocer en que consiste est ciencia tecnolgica y en que campos de accin se puede aplicar.

Para ello es que se propone la investigacin del presente proyecto de tesis y que tiene que ver con la Escuela Fiscal Mixta "Portete de Tarqui" de la Ciudad de Portoviejo, que fue creada como municipal el 2 de Mayo de 1950, inicindose con 120 alumnos en ambos sexos.

En la actualidad cuenta con un local propio moderno y funcional, ubicado en la va Pachinche y 2 de Mayo, en el recinto el Cady de la parroquia Coln, Ciudad de Portoviejo, y cuenta con 250 alumnos entre nias y nios, que oscilan de los 4 a los 14 aos de edad, los mismos que en su mayora son de escasos recursos

16

econmicos. Su actual Director es el Lcdo. Humberto Palacios Saltos, contando con 10 profesores, 1 conserje.

Lo que nos da la idea de la importancia que reviste la modernizacin de sus controles de ingresos y calificaciones, tarea fcil de llevar a la practica porque se cuenta con las herramientas tecnolgicas necesarias para este cometido y que redundar en beneficio de sus estudiantes y una forma ms gil y eficiente de servir a los mismos y a la colectividad Manabita.

Estos cambios que proponemos modificaran sustancialmente la distribucin del trabajo, el uso del tiempo y la agilidad de los procesos, ahorro de dinero y materiales de oficina, como tambin un ahorro en el capital de trabajo que va a posibilitar su traslado en inversin tecnolgica para la mejora de la calidad de los mismos.

Las exigencias actuales exigen directores de escuelas, profesores, trabajadores administrativos y de servicios junto a alumnos y padres de familias, capaces de generar iniciativas, tomar decisiones, conocimiento global e integral, visin estratgica, habituados al trabajo en equipo abiertos a los cambios y dispuestos a transitar los caminos ms innovadores para cumplir los objetivos trazados y a travs de esta investigacin poder llevarla a la realidad.

Este es el siglo del alto desarrollo cientfico y tecnolgico es al mismo tiempo el siglo en el cual las brechas mantiene contradicciones inmensas sin precedentes ya que el valor del conocimiento no beneficia a la mayora de la poblacin.

17

Lo correcto seria que la tcnica tenga sentido contribuyendo al desarrollo humano, que incide directamente sobre los perfiles de desempeo de las personas y las organizaciones en los procesos ocupacionales, para permitir armonizar la incorporacin de herramientas tcnicas modernas, teniendo como eje la solucin de problemas para mejorar la calidad de vida de la poblacin.

Este sistema a implementar determinar los elementos bsicos necesarios para poder desarrollar un software que mejore los procesos, utilizando cdigos que darn mayor realce y presentacin a las interfaces del usuario, las que pueden ser descargadas de paginas Web, dedicadas a la difusin de informacin sobre Visual Basic y otros lenguajes pero siempre ajustndose a las necesidades de esta institucin educativa.

Bajo estos escenarios diremos que esta propuesta esta relacionada ntimamente con la mejora continua de la atencin de sus usuarios (padres de familia), como tambin a la satisfaccin de los objetivos de la escuela, rebasando el concepto de innovacin en base a mejorar incorporando tecnologa de punta, que abarca por el momento solo estas reas y procesos.

2.2. MARCO TERICO "Cualquier conjunto de datos organizados para su almacenamiento en la memoria de un ordenador o computadora, diseado para facilitar su mantenimiento y acceso de una forma estndar. La informacin se organiza en campos y registros. Un

18

campo se refiere a un tipo o atributo d informacin, Y un registro, a toda la informacin sobre un individuo.

Los datos pueden aparecer en forma de texto, nmeros, grficos, sonido o vdeo. Normalmente las bases de datos presentan la posibilidad de consultar datos, bien los de un registro o los de una serie de registros que cumplan una condicin. 1

"Desde su aparicin en la dcada de 1950, estas aplicaciones se han hecho imprescindibles para las sociedades industriales. La primera base de datos para PC data de 1980; era el dBase II, desarrollado por el ingeniero estadounidense Wayne Ratliff. Desde entonces, su evolucin ha seguido paralela a la que ha experimentado el software, y hoy existen desde bases de datos para una utilizacin personal hasta bases de datos corporativas, soportadas por grandes sistemas informticos. 2

Normalmente las bases de datos presentan la posibilidad de consultar datos, bien los de un registro o los de una serie de registros que cumplan una condicin.

Visual Basic "El lenguaje de programacin BASIC (Beginner's All purpose Simholic Instruction Code) se cre en el ao 1964 como una herramienta destinada a principiantes, buscando una forma sencilla de realizar programas, empleando un lenguaje similar

1 2

MICROSOFT VISUAL Basic 6.0 MENTOR ENCICLOPEDIA TEMTICA ESTUDIANTIL OCANO (1997)

19

al que se utiliza en la vida cotidiana y con instrucciones muy sencillas. Teniendo en cuenta el ao de su creacin, este lenguaje cubra la mayora de las necesidades para la ejecucin de programas. Hay que tener en cuenta que las maquinas existentes en esa poca estrenaban los transistores como elementos de conmutacin, los ciclos de trabajo llegaron a la inimaginable cifra de 10.000 x seg. y la memoria en palabras de unos pocos K's en toroides de ferrita. 3

Programacin Visual Basic

La mayora de aplicaciones Windows, as como otros programas, emplean una Interfaz Grfica de Usuario (GUI), consistente en una o ms pantallas llenas de objetos, mens, botones, lneas, cuadros de edicin etc, todos inactivos hasta que el usuario provoca un evento al hacer clic con el ratn sobre un botn, barra de mens, en la formas, o un comando de tecla o de voz. Una vez que el evento ocurre, el usuario espera que cada objeto realice su funcin y se comporte de una manera confiable.

Este requerimiento de confiabilidad y predecibilidad es el que hace que la programacin orientada a objetos y manejada por eventos sea perfecta para el desarrollo de aplicaciones Windows. Visual Basic proporciona un ambiente de desarrollo donde el trabajo tales como objetos y eventos llega a ser un proceso directo, y lo ms importante, bien estructurado.

Manual de Visual Basic,www.canalvisualbasic.net

20

Eventos

Son las acciones que se producen y que nos interesan identificar para establecer algn tipo de respuesta por parte del objeto.

Propiedades

Es un atributo nominal de un objeto de programacin. Las propiedades definen las caractersticas del objeto, tales como tamao, color, longitud, dimetro, o algunas veces, la manera en la cual se comporta el objeto, por ejemplo si un cuadro de texto aceptar lneas de texto mltiples o sencillas.

Mtodos

Una descripcin completa de un objeto, no se limita a sus propiedades, debe comprender una definicin de lo que hace.

Variables

Una variable es una ubicacin de almacenamiento temporal con nombre que se encuentra en memoria. Una variable es capaz de contener un cierto tipo de datos que pueden modificarse durante la ejecucin del programa.

Las variables en Visual Basic, deben limitarse a 255 caracteres, empezar con un carcter alfabtico y no pueden contener un punto. Tampoco se pueden usar

21

nombres de variables, las palabras reservadas como por ejemplo: Sub, End o Function.

Constantes

Como su palabra lo dice es Informacin que no vara hace ms fcil la comprensin del cdigo y permite modificar un valor en un solo lugar no ocupa espacio extra.

Alcances de las variables

El alcance de las variables se refiere al rea del programa en las cuales es visible la variable; es decir en reas del proyecto tendremos disponible las variables. Las variables declaradas dentro de funciones o procedimientos, sern de alcance local. Estas variables son reinicializadas cada vez que se ejecuta el procedimiento. Las variables de nivel de formulario, estarn disponibles para todos los procedimientos del formulario.

Vectores y Matrices

Para declarar matrices debemos colocar entre parntesis el nmero de elementos de los que constar a continuacin del nombre de la variable. De esta forma tenemos un vector de 10 elementos identificados del O al 9. Podemos obligar a que el primer elemento de una matriz tenga el ndice con valor 1.

22

Operadores

La tabla siguiente muestra un conjunto de operadores comunes que soporta Visual Basic para utilizarlos en programacin:

Funciones

Es un procedimiento que realiza una tarea especfica dentro de un programa y al final se obtiene un valor de retorno. Una funcin se define en un modulo que inicia con la instruccin Function y termina con la instruccin End Function

Conexin a una Base de Datos

El Control de Datos (Data) es un control integrado para conectar una aplicacin Visual Basic con una fuente de datos que se selecciona. Los controles de dalos proporcionan una forma visual y fcil para navegar por los campos, registros y tablas de una o ms Bases de Datos. Tambin se usan para enlazar algunos controles, como cuadros de texto, etiquetas, cuadros de dibujo, etc. con los campos de tablas que se seleccionan en su base de datos. Una vez que un control, como un cuadro de texto, est asociado a un campo en particular, cualquier cambio en el contenido del cuadro de texto se registra automticamente en el campo asociado. En pocas palabras, los controles de datos asociados permitirn que se creen aplicaciones de acceso de datos que requieran muy poca o ninguna codificacin. 4

Manual de Visual Basic

23

Data Grid

Gran parte de la informacin por que trata los programas informticos, se presentan en forma de cuadrculas de columnas y filas, como las que se pueden halar en una hoja de clculo. El control de DATA GRID es un nuevo control en VISUAL BASIC 6.0, le permite desplegar datos desde una base de datos en formato de cuadrculas. El control DATA GRID est diseada para utilizarse en los nuevos objetivos de DATOS ACTIVES x (ADO).5

Formularios

Es un contenedor en el que estn todos los dems controles (etiquetas, cuadros de textos e imgenes) que conforman la interfaz del usuario de un programa, la mayora de programas usan unas series de formularios.6

Formularios MDI

MDI significan interfaz de documentos mltiples, que es el trmino utilizado por MICROSOFT para un entorno de ventas en donde una de ellas, denominado contenedor MDI o parte MDI, contiene muchas otras ventanas, denominadas normalmente formularios hijos.7

5 6

JEFF SPOTTS, Brian Spelt. Visual Basic. Edicin Especial, 1999 JEFF SPOTTS, Brian Spler. Visual Basic. Edicin Especial, 1999 7 JEFF SPOTTS, Brian Spler. Visual Basic. Edicin Especial, 1999

24

Consultas

Es un programa gestor de base de datos, tiene que ocuparse de buscar rpidamente los datos de un registro que nosotros queramos consultar, y presentarlo en pantalla.

Esta es una de las principales ventanas de estos programas, pues el tiempo que interviene en localizar una informacin es infinitamente menor que el que empleara una persona para buscar esta informacin manualmente en un enorme fichero. Las consultas sirven para recoger datos de las tablas para una mejor comprensin del Usuario.8

Lenguaje de Consulta SQL

Hace algunos aos apareci un sistema de gestin de Base de Datos que se ha convertido en un estndar en la gestin de datos.

SQL.- Son las inciales de Structured Query Languaje (Consulta mediante lenguaje estructurado).

En la gestin de datos, es necesario utilizar un lenguaje fcil, sencillo de manejar y rpido.

El SQL ofrece ampliamente dichos opciones mediante consultas generales bajo determinados parmetros que se especifican.
8

MICROSOFT CORPORATION. Manual del Usuario Access. Mc Graw-Hill, 1994

25

En realidad es un selector de datos que se conecta con la Base de datos que se le indique y se mueve uno a uno por todos los registros filtrando y analizando los datos para encontrar lo que se necesite.9 El lenguaje de consulta estructurado (SQL) es un lenguaje de base de datos normalizado, utilizado por el motor de base de datos de Microsoft Jet. SQL se utiliza para crear objetos QueryDef, como el argumento de origen del mtodo OpenRecordSet y como la propiedad RecordSource del control de datos. Tambin se puede utilizar con el mtodo Execute para crear y manipular directamente las bases de datos Jet y crear consultas SQL de paso a travs para manipular bases de datos remotas cliente - servidor."

Componentes del SQL

El lenguaje SQL est compuesto por comandos, clusulas, operadores y funciones de agregado. Estos elementos se combinan en las instrucciones para crear, actualizar y manipular las bases de datos.

Comandos

Existen dos tipos de comandos SQL: Los DLL que permiten crear y definir nuevas bases de datos, campos e ndices. Los DML que permiten generar consultas para ordenar, filtrar y extraer datos de la base de datos.10
9

Manual de Visual Basic y SQL, www.canalvisualbasic.net

26

Base de Datos Se define a una Base de Datos como un fichero en el cual se almacena informacin de cualquier tipo.

En dicho fichero la informacin se almacena en campos, por ejemplo, se puede almacenar el nombre y el apellido de las personas de modo separado, de esta forma se obtiene del fichero todos los nombres o todos los apellidos, ya sea de forma separada como de forma conjunta.

"Aunque en realidad se debe tener en cuenta, que una base de datos, tal y como se la conoce, no es solo el fichero en donde se guardan los datos, sino que en dicho fichero se encuentra la estructura de los datos, o sea, para saber que longitud tiene cada campo, es necesario saber como se llama el campo y que longitud en caracteres tiene, as como el tipo de datos que se almacenan en dicho campo, por que guarda desde letras a nmeros e incluso otros datos no sofisticados, esto depende de la estructura de la base de datos y del sistema que se utilice para saber cual es dicha estructura."11

10

11

Manual de Visual Basic, www.canalvisualbasic.net MICROSOFT CORPORATION. Manual del Usuario Access. Me Graw-Hill, 1994

27

CAPTULO III

3.1. DISEO METODOLGICO

3.1.1. MTODOS

Los mtodos que se utilizaron en est investigacin son los siguientes:

No experimental.-Como su nombre lo indica est mtodo se utiliz para el desarrollo del proyecto de investigacin a estudiar; del cual no se llev a cabo ninguna clase de prueba Inductivo.- La forma de trabajar con est mtodo es inducir y centrar con respecto a la investigacin que se realiz mostrando caractersticas y propiedades baj una observacin para hacer conocer razones y hechos particulares en una forma general Bibliogrfico.- Ayud a recabar informacin para la investigacin, para ello se consult en libros, documentos de archivos, folletos y pginas Web.

3.1.2. TCNICAS Observacin Entrevista

3.1.3. INSTRUMENTOS Formulario de Entrevista

28

Fichas Bibliogrficas

3.2. RECURSOS

3.2.1. HUMANOS Miembros de la Escuela Fiscal Mixta "Portete de Tarqui" Director de Tesis Autor del Proyecto

Jos Gabriel Macas Zambrano

3.2.2. MATERIALES Textos Papel bond CD's Materiales de oficina (esfero, lpiz, borrador, carpetas, clips, perforadora,

grapadora, papel copia)

3.2.3. TECNOLGICOS Gestor de Base de Datos ACCESS Microsoft Visual Basic 6.0 Edicin Empresarial

3.2.4. TCNICOS Hardware Software , Versin 2002

29

Computador Pentium 4 de 2.0 GHZ, 512 MB DE RAM

3.2.5. INSTITUCIONALES Universidad Tcnica de Manab Autoridades de la Escuela "Portete de Tarqui"

3.2.6. ECONMICOS

Los recursos econmicos son solventados por el ejecutor del proyecto.

30

3.3. PRESUPUESTO

La investigacin tuvo un costo de $518.02 dlares, valor que se cubri con el aporte del autor de la investigacin, el mismo que fue distribuido de la siguiente manera:

Unidad
Recoleccin de datos (fotocopias) CD-RW Anillado Resma de hojas DIN A4 Fotocopias del proyecto de Tesis Refill de Tinta Negra Refill de Tinta Color Cartucho de tinta negra Cartucho de tinta a color Movilizacin Impresin de la tesis Internet Empastado de la tesis Impresin de la tesis a color Imprevistos 10% TOTAL:

Cantidad
150 7 1 7 115 1 1 1 1

Valor Unitario Valor Total


0.03 1.40 1.60 4.50 0.03 7.00 9.00 21.00 23.00 4.50
9.80 1.60

31.50 3.45 7.00 9.00 21.00 23.00 60.00

700 hojas 10 horas 6 ejemplares 250

0.20 1.00 6.00 0.40

140.00 10.00 36.00 100.00 30.00 $ 518.02

31

CAPTULO IV

4.1. CONCLUSIONES Y RECOMENDACIONES

4.1.1. CONCLUSIONES

Luego de terminado el trabajo de investigacin realizado con el apoyo de la informtica, mediante la creacin de un programa para el funcionamiento de la Escuela Fiscal Mixta Portete de Tarqui, se concluye:

Las actividades del establecimiento escolar en general fueron muy beneficiadas

Mejor sustancialmente la calidad de atencin saliendo beneficiadas especialmente la institucin educativa

Con informacin que se almaceno en la base de dato se pueden realizar investigaciones estadsticas

4.1.2. RECOMENDACIONES

Toda institucin educativa debe tener un programa que permita realizar las labores de atencin y de investigacin ms eficientes

La utilizacin de un programa como est debe de universalizarse, tomando en consideracin todos los programas que para est tipo de atencin existan en el pas, a fin de que teniendo un solo programa estandarizado a nivel nacional,

32

se pueda organizar de manera uniforme la atencin de las instituciones educativas tanto como pblicas y privadas en el Ecuador Al universalizar un programa de matriculacin y control de notas para las instituciones educativas, estaramos como consecuencia estandarizando tambin los protocolos de atencin referentes al trabajo que se realiza en las entidades educativas existentes en el pas.

33

CAPTULO V

PROPUESTA

PORTETE TARQUI

5.1. DESCRIPCIN GENERAL DEL SISTEMA El programa llamado Portete Tarqui es un sistema informtico que sirve para llevar registros de matriculacin y control de notas que se dan en la Escuela Fiscal Mixta Portete de Tarqui, de una manera eficaz y automatizada para saber con exactitud todos los movimientos que constantemente se dan, como son las calificaciones, conductas, materias, datos del estudiante, etc.

El presente sistema informtico lo conforman los siguientes mdulos:

Formulario inicio de sesin Formulario de bienvenida al sistema Formulario Principal (MDI) Formularios de Ingreso y modificacin del estudiante Formularios de ingreso y modificacin del matriculas Formularios de ingreso y modificacin de las materias Formularios de ingreso y modificacin clave del sistema

34

Formularios de ingreso y modificacin de datos de la institucin Formularios de ingreso y modificacin de calificaciones Formularios de ingreso y modificacin del profesor Formularios de reportes

5.2. DETERMINACIN DE REQUERIMIENTOS

Se requiere de un sistema de informacin basado en computadoras, para registrar informacin sobre matriculacin y control de notas para la Escuela Fiscal Mixta Portete de Tarqui, para facilitar o mejorar las actividades que realiza en la misma.

Los requerimientos principales del equipo de computacin que se necesita para un ptimo funcionamiento son:

Marca Mainboard: Tipo de procesador: Tamao de disco duro: Memoria RAM: Monitor: Unidad de CD: Impresora:

Intel Dual Core de 2.0 GHz o Superior 160 Gb de espacio inicial o Superior 1 GB o Superior VGA o SVGA DVD-Rom Opcional

35

5.3. RELACIONES EXISTENTES DE LA BASE DE DATO

36

37

5.4. DISEOS DE MDULOS

PORTETE TARQUI

DATOS REGISTRAR MATERIA MATERIAS ACTUALIZACIN DE MATERIAS REGISTRAR PROFESOR PROFESORES

VER

HERRAMIENTAS BARRA HERRAMIENTA BARRA ESTADO CLAVES CREAR NUEVA CLAVE

REPORTES

AYUDA ACERCA DEL..

MEJORES ESTUDIANTES EN EL PERIODO LISTA DE ESTUDIANTES POR AO BASICA NOTAS DEL AO BASICA POR MATERIA NOTAS DEL ESTUDIANTE POR TRIMESTRE NOTA GENERAL DEL ESTUDIANTE CARNET DEL ESTUDIANTE ACTA DE MATRICULA CERTIFICADO DE CONDUCTA

ACTUALIZACIN DE PROFESORES REGISTRAR AO AO DE EDUCACIN BSICA ACTUALIZACIN DE AOS REGISTRAR ESTUDIANTE ESTUDIANTES ACTUALIZACIN DE ESTUDIANTES REGISTRAR MATRICULA MATRICULAS ACTUALIZACIN DE MATRICULAS CONFIGURACIN ELIMINAR CLAVE MODIFICAR CLAVE

INGRESO DE NOTAS S SALIR

DATOS DEL PROFESOR

38

5.5. CRONOGRAMA VALORADO

TIEMPO EN MESES
MES 1 ACTIVIDADES 1 Elaboracin y presentacin del proyecto Estructuracin de instrumentos Investigacin de la parte Terica Aplicacin de instrumentos de trabajo, tabulacin de los resultados y elaboracin de los cuadros estadsticos. Presentacin del trabajo en el Departamento correspondiente. Sustentacin de la investigacin.
X

MES 2 4
X

MES 3 4 1 2 3 4 1

MES 4 2 3 4 1

MES 5 2 3 4 1

MES 6 HUMANOS MATERIALES COSTOS 2 3 4 Facilitadores y autores del proyecto. Autoras y director de tesis. Autoras y director de tesis. Carpetas y Documentos Instrumentos Papelotes Textos, Folletos, Internet, Copias.

2
X

3
X

35,00

50,00

60,00

Autoras poblacin involucradas.

Instrumentos.

100,00

Autoras y Tribunal.
X

Trabajo: empastado, anillado y grabado. Tesis Final TOTAL

150,00

Autoras y Tribunal.

123,02 518.02

39

BIBLIOGRAFA

BATINI, CERI Y NAVATHE. Diseo Conceptual de Bases de Datos. Adisson Wesley. 1994. Biblioteca de Consulta Microsoft Encarta 2008. HALVARSON, Michael, VISUAL BASIC, (1982). KORTH, Henry y SILVERSCHATZ, Abraham, FUNDAMENTOS DE BASE DE DATOS, (1981). Manual de Visual Basic. MENTOR ENCICLOPEDIA TEMTICA ESTUDIANTIL OCANO (1997) MICROSOFT VISUAL Basic 6.0 PRESSMAN Roger S. Ingeniera del Software. McGraww-Hill. Tercera edicin. 1993. Primera Edicin MC.GRAW HILL. Espaal993 www.canalvisualbasic.net

40

41

42

1. CODIFICACIN DEL PROGRAMA

1.1. FORMULARIO INGRESO AL SISTEMA

Dim Tabla As New ADODB.Recordset Dim Accede As Boolean Dim Oportunidades As Integer

Private Sub LlenarUsuarios() On Error GoTo salir Tabla.Open "Select nombre, iduser from usuarios order by nombre", Base.ConnectionString, adOpenDynamic usuarionombre.Clear While Not Tabla.EOF usuarionombre.AddItem Tabla!nombre usuarionombre.ItemData(usuarionombre.NewIndex) = Tabla!iduser Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarUsuarios Else Unload Me End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 If usuarionombre.ListIndex = -1 Then Exit Sub

43

If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If Tabla.Open "Select clave from usuarios where iduser = " &

usuarionombre.ItemData(usuarionombre.ListIndex), adOpenDynamic If Tabla!clave <> Encripta(password.Text, 1) Then Oportunidades = Oportunidades + 1 If Oportunidades = 3 Then

Base.ConnectionString,

MsgBox "Oportunidades acabadas. Usted no es un usuario apto para acceder al sistema", vbExclamation Accede = False Unload Me Else MsgBox "Clave incorrecta. Lleva " & Oportunidades & " de 3 oportunidades", vbExclamation End If Else Accede = True Unload Me End If Case 1 Accede = False Unload Me End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

44

Private Sub Form_Load() Accede = False Oportunidades = 0 LlenarUsuarios End Sub

Private Sub Form_Unload(Cancel As Integer) If Accede = True Then If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If UsuarioId = usuarionombre.ItemData(usuarionombre.ListIndex) End If End Sub

Private Sub password_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If boton(0).Enabled = True Then boton(0).Value = True End If End Sub

1.2. FORMULARIO DE BIENVENIDA

Dim Tabla As New ADODB.Recordset Dim C As Integer

Private Sub Form_Load() C=0 Tabla.Open "Select * from institucion", Base.ConnectionString, adOpenStatic If Not Tabla.EOF Then If Tabla!nombre <> "" Then NombreInstitucion = Tabla!nombre

45

If Tabla!Direccion <> "" Then DireccionInstitucion = Tabla!Direccion If Tabla!Director <> "" Then DirectorInstitucion = Tabla!Director MaxParciales = Tabla!nparciales MaxAlumnos = Tabla!MaxAlumnos MaxNota = Tabla!nmaxima End If If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If autoriza(0).Caption = "Institucin: " & NombreInstitucion autoriza(1).Caption = "Director: " & DirectorInstitucion Timer1.Interval = 60 '60 estaba actual mente End Sub

Private Sub Timer1_Timer() C=C+1 ProgressBar1.Value = C If C = 100 Then Unload Me End If End Sub

1.3. FORMULARIO PRINCIPAL

Dim TablaReporte As New ADODB.Recordset

Private Sub aboutof_Click() acercade.Show 1 End Sub

Private Sub addnewuser_Click()

46

nuser.Show 1 End Sub

Private Sub asentarmatricula_Click() matricula.Show 1 End Sub

Private Sub barraestado_Click() If barraestado.Checked = True Then barras.Visible = False barraestado.Checked = False Config.esta = False Else barras.Visible = True barraestado.Checked = True Config.esta = True End If MenuVer End Sub

Private Sub barrah_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Index Case 9: Unload central End Select End Sub

Private

Sub

barrah_ButtonMenuClick(ByVal

ButtonMenu

As

MSComctlLib.ButtonMenu) Select Case ButtonMenu.Index Case 1 Select Case Left(ButtonMenu.Key, 4) Case "estu"

47

nestudiante.Show 1 Case "matr" matricula.Show 1 Case "prof" profesor.Show 1 Case "mate" materia.Show 1 Case "clas" curso.Show 1 End Select Case 2 Select Case Left(ButtonMenu.Key, 4) Case "estu" mestudiante.Show 1 Case "matr" mmatricula.Show 1 Case "prof" mprofesor.Show 1 Case "mate" mmateria.Show 1 Case "clas" mcurso.Show 1 End Select Case 3 notas.Show 1 End Select End Sub

Private Sub beststudentintime_Click() mejor.Show 1 End Sub

48

Private Sub deleteuser_Click() delusers.Show 1 End Sub

Private Sub listgeneralofstudent_Click() listadogeneral.Show 1 End Sub

Private Sub matriculas_Click() curso.Show 1 End Sub

Private Sub MDIForm_Load() On Error GoTo salir Cuadro.Height = 10000 Configuracion atras: barras.Panels.Item(1).Text = Format(Date, "dddd dd \de MMMM \de yyyy") mnubherramienta.Checked = Config.herra barrah.Visible = Config.herra barras.Visible = Config.esta barraestado.Checked = Config.esta a$ = AbrirBase If a$ <> "" Then If MsgBox("No se ha podido establecer una conexin con la base de datos. Motivo: - " & a$ & "-", vbRetryCancel + vbInformation) = vbRetry Then GoTo atras archivo.Enabled = False mnuver.Enabled = False reportes.Enabled = False mnuusuarios.Enabled = False mnuayuda.Enabled = False

49

Exit Sub End If TablaReporte.Open "Select count(*) as total from usuarios",

Base.ConnectionString, adOpenDynamic If TablaReporte!total > 0 Then UsuarioId = 0 : TablaReporte.Close loginform.Show 1 If UsuarioId = 0 Then Unload Me: Exit Sub End If inicio.Show 1 If MaxParciales = 0 Then MaxParciales = 3 If MaxNota = 0 Then MaxNota = 20 If TablaReporte.State = 1 Then TablaReporte.Close Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then MDIForm_Load End Sub

Private Sub MDIForm_Unload(Cancel As Integer) MENSAJE = MsgBox("Est seguro que desea salir del sistema?", vbInformation + vbYesNo) If MENSAJE = vbYes Then If TablaReporte.State = 1 Then TablaReporte.Close If Base.State = 1 Then Base.Close End End If Cancel = 1 End Sub

Private Sub mnuActaMatriculas_Click() Load RptMatriculas

50

RptMatriculas.Show 1 End Sub

Private Sub mnubherramienta_Click() If mnubherramienta.Checked = True Then mnubherramienta.Checked = False barrah.Visible = False Config.herra = False Else barrah.Visible = True Config.herra = True mnubherramienta.Checked = True End If MenuVer End Sub

Private Sub mnucascada_Click() central.Arrange vbCascade End Sub

Private Sub mnucarnet_Click() Load RptCarnet : RptCarnet.Show 1 End Sub

Private Sub mnuCertConducta_Click() RptCertificadoConducta.Show 1 End Sub

Private Sub mnuCertMatricula_Click() RptCertMatricula.Show 1 End Sub

51

Private Sub mnuDatosProfesor_Click() Load RptProfesor : RptProfesor.Show 1 End Sub

Private Sub mnuingresoNotas_Click() notas.Show 1 End Sub

Private Sub mnuLibretas_Click() ReportLibreta.Show 1 End Sub

Private Sub modificarmatricula_Click() mmatricula.Show 1 End Sub

Private Sub modificpassword_Click() mclave.Show 1 End Sub

Private Sub mosaichorizontal_Click() central.Arrange vbHorizontal End Sub

Private Sub mosaicvertival_Click() central.Arrange vbVertical End Sub

Private Sub nmateria_Click() materia.Show 1 End Sub

52

Private Sub notaofstuden_Click() ReportNotas.Show 1 End Sub

Private Sub notesofbasicyear_Click() notasmaterias.Show 1 End Sub

Private Sub nuevoestudiante_Click() nestudiante.Show 1 End Sub

Private Sub opci_Click() opciones.Show 1 End Sub

Private Sub organizeicons_Click() central.Arrange vbArrangeIcons End Sub

Private Sub profe_Click() profesor.Show 1 End Sub

Private Sub regestudiantes_Click() mestudiante.Show 1 End Sub

Private Sub regofaniosbasicos_Click() mcurso.Show 1 End Sub

53

Private Sub rofmaterias_Click() mmateria.Show 1 End Sub

Private Sub rofprofesores_Click() mprofesor.Show 1 End Sub

Private Sub salir_Click() MENSAJE = MsgBox("Est seguro que desea salir del sistema?", vbInformation + vbYesNo) If MENSAJE = vbYes Then If TablaReporte.State = 1 Then TablaReporte.Close If Base.State = 1 Then Base.Close End End If End Sub

1.4. FORMULARIO REGISTRAR MATERIA

Dim Tabla As New ADODB.Recordset

Private Sub bloquear(opcion As Boolean) nombre.Enabled = opcion rnumero.Enabled = opcion Label1(0).Enabled = opcion Label1(1).Enabled = opcion boton(0).Enabled = Not opcion End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir

54

Select Case Index Case 0 bloquear (True) nombre.Text = "" Tabla.Open "Select count(nombre) as total from materias",

Base.ConnectionString, adOpenForwardOnly rnumero.Text = Tabla!total + 1 If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If If nombre.Enabled = True Then nombre.SetFocus boton(1).Enabled = False Case 1 Tabla.Open "Select count(nombre) as total from materias where nombre = '" & nombre.Text & "'", Base.ConnectionString, adOpenForwardOnly If Tabla!total Then MsgBox "La materia " & nombre.Text & " ya ha sido registrada en el sistema. Verifique el nombre y despus vuelva a intentarlo", vbExclamation, "Profesor ya registrado" Tabla.Close Set Tabla = Nothing Exit Sub End If Tabla.Close Set Tabla = Nothing Base.Execute "Insert into materias(nombre) values('" & nombre.Text & "')" bloquear (False) boton(1).Enabled = False MsgBox "Materia " & nombre.Text & ", registrada a perfeccin", vbInformation Case Else Unload Me

55

End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub Form_Load() bloquear (False) boton(1).Enabled = False End Sub

Private Sub nombre_Change() If Len(nombre) Then boton(1).Enabled = True Else boton(1).Enabled = False End Sub

Private Sub nombre_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32: If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13: If boton(1).Enabled = True Then boton(1).SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub nombre_LostFocus() nombre = StrConv(nombre, vbProperCase) End Sub

56

1.5. FORMULARIO ACTUALIZACIN MATERIAS

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) On Error GoTo salir If nombre.ListIndex = -1 And Index <> 3 Then Exit Sub Select Case Index Case 0 bloquear (True) boton(0).Enabled = False boton(1).Enabled = False If mpor.Enabled = True Then mpor.SetFocus: mpor.SelLength = Len(mpor) Case 1 Tabla.Open "Select count(materiaId) + 1 as total from aux where materiaId = " & nombre.ItemData(nombre.ListIndex), adOpenForwardOnly If Tabla!total > 1 Then MsgBox "Esta materia no puede ser eliminada ya que ha sido asignada a una o ms clases", vbInformation nombre.SetFocus Tabla.Close Set Tabla = Nothing Exit Sub End If Tabla.Close Set Tabla = Nothing Base.Execute "Delete * from materias where MateriaId = " & Base.ConnectionString,

nombre.ItemData(nombre.ListIndex) bloquear (False) mpor.Text = "" nombre.SetFocus

57

LlenarMaterias MsgBox "Materia eliminada del sistema a perfeccin", vbInformation, "Materia eliminada" Case 2 If Len(mpor.Text) = 0 Then Exit Sub Tabla.Open "Select count(nombre) as total from materias where materiaId <> " & nombre.ItemData(nombre.ListIndex) & " and nombre = '" & nombre.Text & "'", Base.ConnectionString, adOpenForwardOnly If Tabla!total Then MsgBox "La materia " & nombre.Text & " ya ha sido registrada en el sistema. Verifique el nombre y despus vuelva a intentarlo", vbExclamation, "Profesor ya registrado" Tabla.Close Set Tabla = Nothing mpor.SetFocus Exit Sub End If Tabla.Close Set Tabla = Nothing Base.Execute "Update materias set nombre = '" & mpor.Text & "' where materiaId = " & nombre.ItemData(nombre.ListIndex) bloquear (False) mpor.Text = "" LlenarMaterias nombre.SetFocus MsgBox "Materia modificada a perfeccin", vbInformation, "Materia modificada" Case 3 Unload Me End Select Exit Sub salir:

58

If MsgBox(Err.Description, vbRetryCancel + vbExclamation, Err.Source) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub bloquear(opcion As Boolean) nombre.Enabled = Not opcion boton(0).Enabled = opcion boton(1).Enabled = opcion boton(2).Enabled = opcion Label1(0).Enabled = Not opcion Label1(1).Enabled = opcion mpor.Enabled = opcion End Sub

Private Sub LlenarMaterias() On Error GoTo salir nombre.Clear Set Tabla = Base.Execute("Select * from materias order by nombre") While Not Tabla.EOF nombre.AddItem Tabla!nombre nombre.ItemData(nombre.NewIndex) = Tabla!MateriaId Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarMaterias Else Unload Me End Sub

59

Private Sub Form_Load() bloquear (False) LlenarMaterias

End Sub

Private Sub mpor_Change() If Len(mpor) > 0 And mpor.Enabled = True Then boton(2).Enabled = True Else boton(2).Enabled = False End Sub

Private Sub mpor_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(mpor.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 If boton(2).Enabled = True Then boton(2).SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub mpor_LostFocus() mpor = StrConv(mpor, vbProperCase) End Sub

Private Sub nombre_Click() If nombre.ListIndex = -1 Then Exit Sub boton(0).Enabled = True

60

boton(1).Enabled = True mpor.Text = nombre.Text End Sub

1.6. FORMULARIO REGISTRAR PROFESOR

Dim Tabla As New ADODB.Recordset

Private Sub bloquear(opcion As Boolean) nombre.Enabled = opcion Direccion.Enabled = opcion Telefono.Enabled = opcion Especialidad.Enabled = opcion rnumero.Enabled = opcion Label1(0).Enabled = opcion Label1(1).Enabled = opcion Label1(2).Enabled = opcion Label1(3).Enabled = opcion Label1(4).Enabled = opcion boton(0).Enabled = Not opcion End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 bloquear (True) nombre.Text = "" Direccion = "" Telefono = "" Especialidad = ""

61

Tabla.Open

"Select

count(nombre)

as

total

from

profesores",

Base.ConnectionString, adOpenForwardOnly rnumero.Text = Tabla!total + 1 If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If If nombre.Enabled = True Then nombre.SetFocus boton(1).Enabled = False Case 1 Tabla.Open "Select count(nombre) as total from profesores where nombre = '" & nombre.Text & "'", Base.ConnectionString, adOpenForwardOnly If Tabla!total Then MsgBox "El profesor " & nombre.Text & " ya ha sido registrado en el sistema. Verifique el nombre y despus vuelva a intentarlo", vbExclamation, "Profesor ya registrado" Tabla.Close Set Tabla = Nothing Exit Sub End If Tabla.Close Set Tabla = Nothing Base.Execute "Insert into profesores(nombre,direccion,telefono,especialidad) values('" & Trim(nombre) & "','" & Trim(Direccion) & "','" & Telefono & "','" & Trim(Especialidad) & "')" bloquear (False) boton(1).Enabled = False MsgBox "Profesor " & nombre.Text & ", registrado a perfeccin", vbInformation Case Else Unload Me End Select Exit Sub

62

salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub Direccion_KeyPress(Tecla As Integer) Select Case Tecla Case 13 Telefono.SetFocus End Select End Sub

Private Sub Direccion_LostFocus() Direccion = StrConv(Direccion, vbProperCase) End Sub

Private Sub Especialidad_KeyPress(Tecla As Integer) Select Case Tecla Case Asc("a") To Asc("z") Case Asc("A") To Asc("Z") Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case 8, 32 Case 13: boton(1).SetFocus Case Else Tecla = 0 End Select End Sub

Private Sub Especialidad_LostFocus() Especialidad = StrConv(Especialidad, vbProperCase) End Sub

63

Private Sub Form_Load() bloquear (False) boton(1).Enabled = False End Sub

Private Sub nombre_Change() If Len(nombre) Then boton(1).Enabled = True Else boton(1).Enabled = False End Sub

Private Sub nombre_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 Direccion.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub nombre_LostFocus() nombre = StrConv(nombre, vbProperCase) End Sub

Private Sub Telefono_KeyPress(Tecla As Integer) Select Case Tecla Case 48 To 57 Case 8 Case 13

64

Especialidad.SetFocus Case Else Tecla = 0 End Select End Sub

1.7. FORMULARIO ACTUALIZACIN DE PROFESORES

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) On Error GoTo salir If nombre.ListIndex = -1 And Index <> 3 Then Exit Sub Select Case Index Case 0 bloquear (True) boton(0).Enabled = False boton(1).Enabled = False If mpor.Enabled = True Then mpor.SetFocus: mpor.SelLength = Len(mpor) Case 1 Tabla.Open "Select count(ProfesorId) + 1 as total from aux where ProfesorId = " & nombre.ItemData(nombre.ListIndex), Base.ConnectionString,

adOpenForwardOnly If Tabla!total > 1 Then MsgBox "El profesor no puede ser eliminado del sistema ya que ha sido asignado a una o ms clases", vbInformation nombre.SetFocus Tabla.Close Set Tabla = Nothing Exit Sub End If Tabla.Close

65

Set Tabla = Nothing Base.Execute "Delete * from profesores where ProfesorId = " &

nombre.ItemData(nombre.ListIndex) bloquear (False) mpor.Text = "" Direccion = "" Telefono = "" Especialidad = "" nombre.SetFocus LlenarProfesores MsgBox "Profesor eliminada del sistema a perfeccin", vbInformation, "Materia eliminada" Case 2 If Len(mpor.Text) = 0 Then Exit Sub Tabla.Open "Select count(nombre) as total from profesores where ProfesorId <> " & nombre.ItemData(nombre.ListIndex) & " and nombre = '" & nombre.Text & "'", Base.ConnectionString, adOpenForwardOnly If Tabla!total Then MsgBox "El profesor: " & nombre.Text & ", ya ha sido registrado en el sistema. Verifique el nombre y despus vuelva a intentarlo", vbExclamation, "Profesor ya registrado" Tabla.Close : Set Tabla = Nothing mpor.SetFocus Exit Sub End If Tabla.Close Set Tabla = Nothing Base.Execute "Update profesores set nombre = '" & Trim(mpor) & "',direccion='" & Trim(Direccion) & "',telefono='" & Telefono & "',especialidad='" & Trim(Especialidad) & "' where ProfesorId = " &

nombre.ItemData(nombre.ListIndex) bloquear (False)

66

mpor.Text = "" Direccion = "" Telefono = "" Especialidad = "" LlenarProfesores nombre.SetFocus MsgBox "Profesor modificado a perfeccin", vbInformation, "Materia

modificada" Case 3: Unload Me End Select Exit Sub salir: If MsgBox(Err.Description, vbRetryCancel + vbExclamation, Err.Source) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub bloquear(opcion As Boolean) nombre.Enabled = Not opcion boton(0).Enabled = opcion boton(1).Enabled = opcion boton(2).Enabled = opcion Label1(0).Enabled = Not opcion Label1(1).Enabled = opcion Label1(2).Enabled = opcion Label1(3).Enabled = opcion Label1(4).Enabled = opcion mpor.Enabled = opcion Direccion.Enabled = opcion Telefono.Enabled = opcion Especialidad.Enabled = opcion End Sub

67

Private Sub LlenarProfesores() On Error GoTo salir nombre.Clear Set Tabla = Base.Execute("Select * from Profesores order by nombre") While Not Tabla.EOF nombre.AddItem Tabla!nombre nombre.ItemData(nombre.NewIndex) = Tabla!profesorid Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarProfesores Else Unload Me End Sub

Private Sub Direccion_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 13 Telefono.SetFocus End Select End Sub

Private Sub Direccion_LostFocus() Direccion = StrConv(Direccion, vbProperCase) End Sub

Private Sub Especialidad_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 13 boton(2).SetFocus

68

End Select End Sub

Private Sub Especialidad_LostFocus() Especialidad = StrConv(Especialidad, vbProperCase) End Sub

Private Sub Form_Load() bloquear (False) LlenarProfesores End Sub

Private Sub mpor_Change() If Len(mpor) > 0 And mpor.Enabled = True Then boton(2).Enabled = True Else boton(2).Enabled = False End Sub

Private Sub mpor_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32: If Len(mpor.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13: Direccion.SetFocus Case Else: KeyAscii = 0 End Select End Sub

Private Sub mpor_LostFocus() mpor = StrConv(mpor, vbProperCase) End Sub

69

Private Sub nombre_Click() If nombre.ListIndex = -1 Then Exit Sub boton(0).Enabled = True boton(1).Enabled = True On Error GoTo Trata If Tabla.State = 1 Then Tabla.Close Set Tabla = Base.Execute("select * from profesores where nombre='" & Trim(nombre.Text) & "'") mpor.Text = Tabla!nombre Direccion = Tabla!Direccion Telefono = Tabla!Telefono Especialidad = Tabla!Especialidad Tabla.Close Set Tabla = Nothing Exit Sub Trata: If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If End Sub

Private Sub Telefono_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57, Asc("-"), 8 Case 13 Especialidad.SetFocus Case Else KeyAscii = 0 End Select End Sub

70

1.8. FORMULARIO REGISTRAR AO BSICO

Dim Tabla As New ADODB.Recordset

Private Sub agrega_Click() matprofe(0).AddItem materia.Text matprofe(0).ItemData(matprofe(0).NewIndex) = materia.ItemData(materia.ListIndex) materia.RemoveItem materia.ListIndex matprofe(1).AddItem profesor.Text matprofe(1).ItemData(matprofe(1).NewIndex) = profesor.ItemData(profesor.ListIndex) agrega.Enabled = False boton(1).Enabled = pregunta End Sub

Private Sub Limpiar() nombre.Text = "" matprofe(0).Clear matprofe(1).Clear End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Dim IdAnio As Long Select Case Index Case 0 bloquear (True) boton(1).Enabled = False LlenarMateria LlenarProfesor Limpiar

71

If nombre.Enabled = True Then nombre.SetFocus Case 1 Set Tabla = Base.Execute("Select count(*) as total from curso where nombre = '" & nombre.Text & "'") If Tabla!total > 0 Then MsgBox "El aula o ao bsico a crear ya ha sido registrado. Cambie el nombre si desea continuar", vbExclamation, "Ao ya existente" nombre.SetFocus Exit Sub End If Tabla.Close Set Tabla = Nothing Base.Execute ("Insert into curso(nombre) values('" & nombre.Text & "')") Set Tabla = Base.Execute("Select IdAnio from curso where nombre = '" & nombre.Text & "'") If Not Tabla.EOF Then IdAnio = Tabla!IdAnio Tabla.Close Set Tabla = Nothing For i% = 0 To matprofe(0).ListCount - 1 Base.Execute ("Insert Into Aux(AnioId, MateriaId, ProfesorId) values(" & IdAnio & "," & matprofe(0).ItemData(i%) & "," & matprofe(1).ItemData(i%) & ")") Next MsgBox "Ao bsico creado a perfeccin", vbInformation bloquear (False) Case Else: Unload curso End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) End Sub

72

Private Sub Form_Load() bloquear (False) End Sub

Private Sub bloquear(opcion As Boolean) Frame1.Enabled = opcion Frame2.Enabled = opcion nombre.Enabled = opcion Label1(0).Enabled = opcion Label1(1).Enabled = opcion Label1(2).Enabled = opcion agrega.Enabled = False materia.Enabled = opcion profesor.Enabled = opcion boton(0).Enabled = Not opcion boton(1).Enabled = opcion End Sub

Private Sub materia_Click() If materia.ListIndex <> -1 And profesor.ListIndex <> -1 Then agrega.Enabled = True Else agrega.Enabled = False End Sub

Private Sub matprofe_Click(Index As Integer) If Index Then matprofe(0).ListIndex = matprofe(1).ListIndex Else matprofe(1).ListIndex = matprofe(0).ListIndex End If End Sub

Private Sub LlenarMateria()

73

On Error GoTo salir materia.Clear Set Tabla = Base.Execute("Select * from materias order by nombre") While Not Tabla.EOF materia.AddItem Tabla!nombre materia.ItemData(materia.NewIndex) = Tabla!MateriaId Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarMateria End Sub

Private Sub LlenarProfesor() On Error GoTo salir profesor.Clear Set Tabla = Base.Execute("Select * from profesores order by nombre") While Not Tabla.EOF profesor.AddItem Tabla!nombre profesor.ItemData(profesor.NewIndex) = Tabla!profesorid Tabla.MoveNext Wend Tabla.Close : Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarProfesor End Sub

74

Private Sub matprofe_DblClick(Index As Integer) On Error Resume Next If MsgBox("Est usted seguro de eliminar la materia y al profesor seleccionado?", vbYesNo + vbQuestion) = vbYes Then materia.AddItem matprofe(0).Text materia.ItemData(materia.NewIndex) matprofe(0).ItemData(matprofe(0).ListIndex) matprofe(0).RemoveItem (matprofe(0).ListIndex) matprofe(1).RemoveItem (matprofe(1).ListIndex) End If boton(1).Enabled = pregunta End Sub =

Private Sub nombre_Change() boton(1).Enabled = pregunta End Sub

Private Sub nombre_LostFocus() nombre = StrConv(nombre, vbProperCase) End Sub

Private Sub profesor_Click() If materia.ListIndex <> -1 And profesor.ListIndex <> -1 Then agrega.Enabled = True Else agrega.Enabled = False End Sub

Private Function pregunta() As Boolean If Len(nombre.Text) > 0 And matprofe(0).ListCount > 0 Then pregunta = True Else pregunta = False End Function

75

1.9. FORMULARIO ACTUALIZACIN DE AOS BSICAS

Dim Tabla As New ADODB.Recordset Dim Aux As New ADODB.Connection

Private Sub agrega_Click() On Error GoTo sale Aux.Execute "Insert into aux(anioid,materiaid,profesorid) & & "," "," values(" & & &

nombre.ItemData(nombre.ListIndex) materia.ItemData(materia.ListIndex) profesor.ItemData(profesor.ListIndex) & ")" matprofe(0).AddItem materia.Text matprofe(0).ItemData(matprofe(0).NewIndex) materia.ItemData(materia.ListIndex) materia.RemoveItem materia.ListIndex matprofe(1).AddItem profesor.Text matprofe(1).ItemData(matprofe(1).NewIndex) profesor.ItemData(profesor.ListIndex) agrega.Enabled = False boton(2).Enabled = pregunta Exit Sub sale:

If MsgBox(Err.Description, vbQuestion + vbRetryCancel) = vbRetry Then agrega_Click End Sub

Private Sub Limpiar() nombre.ListIndex = -1 matprofe(0).Clear mpor.Text = "" materia.Clear profesor.Clear

76

matprofe(1).Clear End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo sale Dim IdAnio As Long Select Case Index Case 0 bloquear (True) boton(0).Enabled = False boton(1).Enabled = False boton(2).Enabled = True Aux.Open Base.ConnectionString Aux.BeginTrans mpor.SetFocus Case 1 If nombre.ListIndex = -1 Then Exit Sub Set Tabla = Base.Execute("Select count(*) + 1 as total from matriculas where IdCurso = " & nombre.ItemData(nombre.ListIndex)) If Tabla!total > 1 Then MsgBox "No se puede eliminar el ao bsico porque se han matriculado estudiantes en l.", vbExclamation nombre.SetFocus Tabla.Close Set Tabla = Nothing Exit Sub End If Tabla.Close Set Tabla = Nothing Base.Execute ("Delete * from curso where idanio = " &

nombre.ItemData(nombre.ListIndex)) LlenarCurso

77

Limpiar MsgBox "Ao bsico eliminado del sistema a perfeccin", vbInformation bloquear (False) Case 2 Set Tabla = Aux.Execute("Select count(*) + 1 as total from curso where nombre = '" & mpor.Text & "' and idanio <> " & nombre.ItemData(nombre.ListIndex)) If Tabla!total > 1 Then MsgBox "El aula o ao bsico a crear ya ha sido registrado. Cambie el nombre si desea continuar", vbExclamation, "Ao ya existente" mpor.SetFocus Tabla.Close Set Tabla = Nothing Exit Sub End If Aux.Execute "Update curso set nombre = '" & mpor.Text & "' where idanio = " & nombre.ItemData(nombre.ListIndex) Tabla.Close Set Tabla = Nothing Aux.CommitTrans Aux.Close LlenarCurso Limpiar MsgBox "Ao bsico modificado a perfeccin", vbInformation bloquear (False) Case 3 If Aux.State = 1 Then Aux.RollbackTrans If Aux.State = 1 Then Aux.Close Unload Me End Select Exit Sub sale:

78

If MsgBox(Err.Description, vbQuestion + vbRetryCancel) = vbRetry Then boton_Click (Index) End Sub

Private Sub Form_Load() bloquear (False) LlenarCurso End Sub

Private Sub bloquear(opcion As Boolean) Frame2.Enabled = opcion nombre.Enabled = Not opcion Label1(0).Enabled = opcion Label1(1).Enabled = opcion Label1(2).Enabled = opcion mpor.Enabled = opcion matprofe(0).Enabled = opcion matprofe(1).Enabled = opcion Label1(3).Enabled = opcion agrega.Enabled = False materia.Enabled = opcion profesor.Enabled = opcion boton(0).Enabled = opcion boton(1).Enabled = opcion boton(2).Enabled = opcion End Sub

Private Sub materia_Click() If materia.ListIndex <> -1 And profesor.ListIndex <> -1 Then agrega.Enabled = True Else agrega.Enabled = False End Sub

79

Private Sub matprofe_Click(Index As Integer) If Index Then matprofe(0).ListIndex = matprofe(1).ListIndex Else matprofe(1).ListIndex = matprofe(0).ListIndex End If End Sub

Private Sub LlenarCurso() On Error GoTo sale nombre.Clear Set Tabla = Base.Execute("Select * from curso order by nombre") While Not Tabla.EOF nombre.AddItem Tabla!nombre nombre.ItemData(nombre.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub sale: If MsgBox(Err.Description, vbQuestion + vbRetryCancel) = vbRetry Then LlenarCurso End Sub

Private Sub LlenarTodo() On Error GoTo sale Dim FlagTabla As Boolean FlagTabla = False materia.Clear profesor.Clear matprofe(0).Clear

80

matprofe(1).Clear If nombre.ListIndex = -1 Then Exit Sub Tabla.Open "SELECT Materias.Nombre, Materias.MateriaId, Aux.AnioId,

Profesores.Nombre as Profesor, Profesores.ProfesorId " & _ "FROM Profesores INNER JOIN (Materias INNER JOIN Aux ON

Materias.MateriaId = Aux.MateriaId) ON Profesores.ProfesorId = Aux.ProfesorId "&_ "WHERE Aux.AnioId = " & nombre.ItemData(nombre.ListIndex),

Base.ConnectionString, adOpenDynamic While Not Tabla.EOF matprofe(0).AddItem Tabla!nombre matprofe(0).ItemData(matprofe(0).NewIndex) = Tabla!MateriaId matprofe(1).AddItem Tabla!profesor matprofe(1).ItemData(matprofe(1).NewIndex) = Tabla!profesorid Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select * from profesores order by nombre") While Not Tabla.EOF profesor.AddItem Tabla!nombre profesor.ItemData(profesor.NewIndex) = Tabla!profesorid Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select * from materias order by nombre") While Not Tabla.EOF For i% = 0 To matprofe(0).ListCount - 1 FlagTabla = True If Tabla!MateriaId = matprofe(0).ItemData(i%) Then FlagTabla = False

81

Exit For End If Next If FlagTabla = True Then materia.AddItem Tabla!nombre materia.ItemData(materia.NewIndex) = Tabla!MateriaId End If Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub sale: If MsgBox(Err.Description, vbQuestion + vbRetryCancel) = vbRetry Then LlenarTodo End Sub

Private Sub matprofe_DblClick(Index As Integer) On Error GoTo salir If MsgBox("Est usted seguro de eliminar la materia y al profesor seleccionado?", vbYesNo + vbQuestion) = vbYes Then Aux.Execute "delete * from aux & " where and anioid materiaid = = " " & &

nombre.ItemData(nombre.ListIndex)

matprofe(0).ItemData(matprofe(0).ListIndex) materia.AddItem matprofe(0).Text materia.ItemData(materia.NewIndex) matprofe(0).ItemData(matprofe(0).ListIndex) matprofe(0).RemoveItem (matprofe(0).ListIndex) matprofe(1).RemoveItem (matprofe(1).ListIndex) End If boton(2).Enabled = pregunta Exit Sub =

82

salir: MsgBox "No se puede eliminar la materia selecionada debido a: " & Err.Description, vbExclamation End Sub

Private Sub mpor_Change() boton(2).Enabled = pregunta End Sub

Private Sub mpor_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 materia.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub mpor_LostFocus() mpor = StrConv(mpor, vbProperCase) End Sub

Private Sub nombre_Click() mcurso.MousePointer = vbHourglass LlenarTodo boton(0).Enabled = True boton(1).Enabled = True

83

mpor.Text = nombre.Text mcurso.MousePointer = vbNormal End Sub

Private Sub profesor_Click() If materia.ListIndex <> -1 And profesor.ListIndex <> -1 Then agrega.Enabled = True Else agrega.Enabled = False End Sub

Private Function pregunta() As Boolean If boton(0).Enabled = False And Len(mpor.Text) > 0 And matprofe(0).ListCount > 0 Then pregunta = True Else pregunta = False End Function

1.10. FORMULARIO REGISTRAR ESTUDIANTE

Dim Tabla As New ADODB.Recordset Dim Sex As Integer

Private Sub anioescolar_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then calificacion.SetFocus End Sub

Private Sub anioescolar_LostFocus() anioescolar = StrConv(anioescolar.Text, vbProperCase) End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 bloquear (True)

84

Limpiar LlenarCombos boton(1).Enabled = False If nombre.Enabled = True Then nombre.SetFocus Case 1 If Len(nombre) = 0 Then MsgBox "Campo vacio", vbCritical nombre.SetFocus Exit Sub ElseIf Len(lnacido) = 0 Then MsgBox "Campo vacio", vbCritical lnacido.SetFocus Exit Sub ElseIf Len(procedencia) = 0 Then MsgBox "Campo vacio", vbCritical procedencia.SetFocus Exit Sub ElseIf Len(ciudad) = 0 Then MsgBox "Campo vacio", vbCritical ciudad.SetFocus Exit Sub ElseIf Len(claseescuela) = 0 Then MsgBox "Campo vacio", vbCritical claseescuela.SetFocus Exit Sub ElseIf Len(anioescolar) = 0 Then MsgBox "Campo vacio", vbCritical anioescolar.SetFocus Exit Sub ElseIf Len(calificacion) = 0 Then MsgBox "Campo vacio", vbCritical calificacion.SetFocus

85

Exit Sub ElseIf Len(origenmatricula) = 0 Then MsgBox "Campo vacio", vbCritical origenmatricula.SetFocus Exit Sub ElseIf Len(fono) = 0 Then MsgBox "Campo vacio", vbCritical fono.SetFocus Exit Sub ElseIf Len(nacionalidad) = 0 Then MsgBox "Campo vacio", vbCritical nacionalidad.SetFocus Exit Sub ElseIf Len(vivecon) = 0 Then MsgBox "Campo vacio", vbCritical vivecon.SetFocus Exit Sub ElseIf Len(padre) = 0 Then MsgBox "Campo vacio", vbCritical padre.SetFocus Exit Sub ElseIf Len(ocupacionp) = 0 Then MsgBox "Campo vacio", vbCritical ocupacionp.SetFocus Exit Sub ElseIf Len(madre) = 0 Then MsgBox "Campo vacio", vbCritical madre.SetFocus Exit Sub ElseIf Len(ocupacionm) = 0 Then MsgBox "Campo vacio", vbCritical ocupacionm.SetFocus

86

Exit Sub ElseIf Len(direcciona) = 0 Then MsgBox "Campo vacio", vbCritical direcciona.SetFocus Exit Sub ElseIf Len(situacion) = 0 Then MsgBox "Campo vacio", vbCritical situacion.SetFocus Exit Sub ElseIf Len(salud) = 0 Then MsgBox "Campo vacio", vbCritical salud.SetFocus Exit Sub End If Tabla.Open "select count(nombre) as total from datos where nombre = '" & nombre.Text & "'", Base.ConnectionString, adOpenForwardOnly If Tabla!total > 0 Then If MsgBox("Existen " & Tabla!total & " estudiante(s) registrado(s) con el mismo nombre. An as desea continuar?.", vbExclamation + vbYesNo) = vbNo Then nombre.SetFocus: Tabla.Close: Exit Sub End If Tabla.Close Set Tabla = Nothing If Year(Date) - Year(nacido.Value) < 4 Then If MsgBox("La edad mnima del estudiante debe ser a partir de los 4 aos. An as desea continuar?", vbYesNo + vbExclamation, "Edad seleccionada = " & Year(Date) - Year(nacido.Value)) = vbNo Then Exit Sub End If If MsgBox("Esta seguro de querer registrar al estudiante " & nombre.Text & "?.", vbInformation + vbYesNo) = vbNo Then Exit Sub sql$ = "Insert into

datos(nombre,lnacimiento,fecha,procedencia,ciudad,claseescuela,anioescuela,calif

87

icacion,origenmatricula,nacionalidad,vivecon,fono,padre,madre,direapoderado,oc upacionp,ocupacionm,situacion,salud,sexo) values('" sql$ = sql$ & nombre.Text & "','" & Left(lnacido.Text, 30) & "','" & nacido.Value & "','" & Left(procedencia.Text, 30) & "','" & Left(ciudad.Text, 30) & "','" & Left(claseescuela.Text, 20) & "','" & Left(anioescolar.Text, 20) & "'," & Val(calificacion.Text) & ",'" & Left(origenmatricula.Text, 30) & "','" & Left(nacionalidad.Text, 20) & "','" & Left(vivecon.Text, 40) & "','" & fono.Text & "','" & padre.Text & "','" & madre.Text & "','" & direcciona.Text & "','" & ocupacionp & "','" & ocupacionm.Text & "','" & Left(situacion.Text, 10) & "','" & Left(salud.Text, 10) & "'," & Sex & ")" Base.Execute sql$ bloquear (False) MsgBox "Se ha registrado al estudiante " & nombre.Text & ", a perfeccin", vbInformation, "Estudiante registrado" Case Else Unload nestudiante End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub bloquear(opcion As Boolean) Frame1.Enabled = opcion boton(0).Enabled = Not opcion boton(1).Enabled = opcion Frame2.Enabled = opcion Sexo(0).Enabled = opcion Sexo(1).Enabled = opcion For i% = 0 To 18 Label1(i%).Enabled = opcion

88

Next End Sub

Private Sub Limpiar() nombre.Text = "" ciudad.Text = "" direcciona.Text = "" nacionalidad.Text = "" procedencia.Text = "" claseescuela.Text = "" anioescolar.Text = "" calificacion.Text = "" origenmatricula.Text = "" situacion.Text = "" vivecon.Text = "" salud.Text = "" lnacido.Text = "" padre.Text = "" madre.Text = "" ocupacionp.Text = "" fono.Text = "" ocupacionm.Text = "" fono.Text = "" End Sub

Private Sub calificacion_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 If (Val(calificacion) * 10 + KeyAscii - 48) > MaxNota Then KeyAscii = 0 Case 8 Case 13 origenmatricula.SetFocus

89

Case Else KeyAscii = 0 End Select End Sub

Private Sub calificacion_LostFocus() calificacion = Val(calificacion.Text) End Sub

Private Sub ciudad_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then claseescuela.SetFocus End Sub

Private Sub ciudad_LostFocus() ciudad = StrConv(ciudad.Text, vbProperCase) End Sub

Private Sub claseescuela_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(claseescuela.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 anioescolar.SetFocus Case Else: KeyAscii = 0 End Select End Sub

Private Sub claseescuela_LostFocus() claseescuela = StrConv(claseescuela.Text, vbProperCase)

90

End Sub

Private Sub direcciona_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then situacion.SetFocus End Sub

Private Sub direcciona_LostFocus() direcciona = StrConv(direcciona.Text, vbProperCase) End Sub

Private Sub fono_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57, Asc("-"), 8 Case 13 Sexo(0).SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub Form_Load() bloquear (False) nacido.Value = Date nacido.MaxDate = Date Sex = 0 Sexo(0).Value = True End Sub

Private Sub madre_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0

91

Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 ocupacionm.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub madre_LostFocus() madre = StrConv(madre.Text, vbProperCase) End Sub

Private Sub nacido_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then procedencia.SetFocus End If End Sub

Private Sub nacido_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then nhermanos.SetFocus End Sub

Private Sub nacionalidad_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13

92

vivecon.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub nacionalidad_LostFocus() nacionalidad = StrConv(nacionalidad.Text, vbProperCase) End Sub

Private Sub nombre_Change() If Len(nombre.Text) > 0 Then boton(1).Enabled = True Else boton(1).Enabled = False End Sub

Private Sub nombre_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13: lnacido.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub lnacido_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then nacido.SetFocus End Sub

93

Private Sub lnacido_LostFocus() lnacido.Text = StrConv(lnacido.Text, vbProperCase) End Sub

Private Sub nombre_LostFocus() nombre.Text = StrConv(nombre.Text, vbProperCase) End Sub

Private Sub ocupacionm_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(ocupacionm.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 direcciona.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub ocupacionm_LostFocus() ocupacionm = StrConv(ocupacionm.Text, vbProperCase) End Sub

Private Sub ocupacionp_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(ocupacionp.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("")

94

Case Asc(""), Asc("") Case 13 madre.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub ocupacionp_LostFocus() ocupacionp = StrConv(ocupacionp.Text, vbProperCase) End Sub

Private Sub origenmatricula_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(origenmatricula.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 fono.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub origenmatricula_LostFocus() origenmatricula = StrConv(origenmatricula.Text, vbProperCase) End Sub

Private Sub padre_KeyPress(KeyAscii As Integer) Select Case KeyAscii

95

Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 ocupacionp.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub padre_LostFocus() padre = StrConv(padre.Text, vbProperCase) End Sub

Private Sub procedencia_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 Case 32 If Len(procedencia.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 ciudad.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub procedencia_LostFocus()

96

procedencia = StrConv(procedencia.Text, vbProperCase) End Sub

Private Sub salud_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 If boton(1).Enabled = True Then boton(1).SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub salud_LostFocus() salud = StrConv(salud.Text, vbProperCase) End Sub

Private Sub sexo_Click(Index As Integer) Sex = Index End Sub

Private Sub sexo_KeyPress(Index As Integer, KeyAscii As Integer) If KeyAscii = 13 Then nacionalidad.SetFocus End Sub

Private Sub situacion_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32

97

If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 salud.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub situacion_LostFocus() situacion = StrConv(situacion.Text, vbProperCase) End Sub

Private Sub vivecon_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13: padre.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub vivecon_LostFocus() vivecon = StrConv(vivecon.Text, vbProperCase) End Sub

98

Private Sub LlenarCombos() lnacido.Clear procedencia.Clear ciudad.Clear anioescolar.Clear origenmatricula.Clear claseescuela.Clear nacionalidad.Clear vivecon.Clear situacion.Clear salud.Clear Set Tabla = Base.Execute("Select DISTINCT lnacimiento FROM DATOS Where Lnacimiento <> '' order by lnacimiento") While Not Tabla.EOF lnacido.AddItem Tabla!lnacimiento Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT procedencia FROM Datos Where Procedencia <> '' order by procedencia") While Not Tabla.EOF procedencia.AddItem Tabla!procedencia Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Ciudad from datos Where Ciudad <> '' order by ciudad") While Not Tabla.EOF ciudad.AddItem Tabla!ciudad Tabla.MoveNext

99

Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT OrigenMatricula from datos where OrigenMatricula <> '' order by OrigenMatricula") While Not Tabla.EOF origenmatricula.AddItem Tabla!origenmatricula Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Nacionalidad from datos Where Nacionalidad <> '' order by nacionalidad") While Not Tabla.EOF nacionalidad.AddItem Tabla!nacionalidad Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Vivecon from datos Where vivecon <> '' order by vivecon") While Not Tabla.EOF vivecon.AddItem Tabla!vivecon Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Situacion from datos Where Situacion <> '' order by Situacion") While Not Tabla.EOF situacion.AddItem Tabla!situacion Tabla.MoveNext

100

Wend Tabla.Close : Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Salud from datos Where salud <> '' order by salud") While Not Tabla.EOF salud.AddItem Tabla!salud Tabla.MoveNext Wend Tabla.Close : Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT AnioEscuela from datos Where AnioEscuela <> '' order by AnioEscuela") While Not Tabla.EOF anioescolar.AddItem Tabla!AnioEscuela Tabla.MoveNext Wend Tabla.Close : Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT ClaseEscuela from datos Where ClaseEscuela <> '' order by ClaseEscuela") While Not Tabla.EOF claseescuela.AddItem Tabla!claseescuela Tabla.MoveNext Wend Tabla.Close : Set Tabla = Nothing End Sub

1.11. FORMULARIO ACTUALIZACIN DE ESTUDIANTES

Dim Tabla As New ADODB.Recordset Dim Nomb As String Dim Sex As Byte

Private Sub anioescolar_KeyPress(KeyAscii As Integer)

101

If KeyAscii = 13 Then calificacion.SetFocus End Sub

Private Sub anioescolar_LostFocus() anioescolar = StrConv(anioescolar.Text, vbProperCase) End Sub

Private Sub calificacion_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 If (Val(calificacion) * 10 + KeyAscii - 48) > MaxNota Then KeyAscii = 0 Case 8 Case 13 origenmatricula.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub calificacion_LostFocus() calificacion = Val(calificacion.Text) End Sub

Private Sub ciudad_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then claseescuela.SetFocus End Sub

Private Sub Direccion_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then fono.SetFocus End Sub

Private Sub ciudad_LostFocus()

102

ciudad = StrConv(ciudad.Text, vbProperCase) End Sub

Private Sub claseescuela_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(claseescuela.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 anioescolar.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub claseescuela_LostFocus() claseescuela = StrConv(claseescuela.Text, vbProperCase) End Sub

Private Sub direcciona_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then situacion.SetFocus End Sub

Private Sub direcciona_LostFocus() direcciona = StrConv(direcciona.Text, vbProperCase) End Sub

Private Sub fono_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57, Asc("-"), 8

103

Case 13 Sexo(0).SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub madre_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 ocupacionm.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub madre_LostFocus() madre = StrConv(madre.Text, vbProperCase) End Sub

Private Sub nacido_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then procedencia.SetFocus End Sub

Private Sub nacionalidad_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32

104

If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 vivecon.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub nacionalidad_LostFocus() nacionalidad = StrConv(nacionalidad.Text, vbProperCase) End Sub

Private Sub nombre_Change() If Len(nombre.Text) > 0 And lnacido.Enabled = True Then boton(2).Enabled = True Else boton(2).Enabled = False End Sub

Private Sub nombre_KeyPress(KeyAscii As Integer) On Error Resume Next Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 lnacido.SetFocus Case Else KeyAscii = 0

105

End Select End Sub

Private Sub lnacido_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then nacido.SetFocus End Sub

Private Sub lnacido_LostFocus() lnacido.Text = StrConv(lnacido.Text, vbProperCase) End Sub

Private Sub nombre_LostFocus() nombre.Text = StrConv(nombre.Text, vbProperCase) End Sub

Private Sub ocupacionm_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(ocupacionm.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13: direcciona.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub ocupacionm_LostFocus() ocupacionm = StrConv(ocupacionm.Text, vbProperCase) End Sub

106

Private Sub ocupacionp_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(ocupacionp.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 madre.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub ocupacionp_LostFocus() ocupacionp = StrConv(ocupacionp.Text, vbProperCase) End Sub

Private Sub origenmatricula_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(origenmatricula.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 fono.SetFocus Case Else KeyAscii = 0 End Select End Sub

107

Private Sub origenmatricula_LostFocus() origenmatricula = StrConv(origenmatricula.Text, vbProperCase) End Sub

Private Sub padre_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 ocupacionp.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub padre_LostFocus() padre = StrConv(padre.Text, vbProperCase) End Sub

Private Sub procedencia_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 Case 32 If Len(procedencia.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 ciudad.SetFocus

108

Case Else KeyAscii = 0 End Select End Sub

Private Sub procedencia_LostFocus() procedencia = StrConv(procedencia.Text, vbProperCase) End Sub

Private Sub salud_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 If boton(1).Enabled = True Then boton(1).SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub salud_LostFocus() salud = StrConv(salud.Text, vbProperCase) End Sub

Private Sub sexo_Click(Index As Integer) Sex = Index End Sub

Private Sub sexo_KeyPress(Index As Integer, KeyAscii As Integer)

109

If KeyAscii = 13 Then nacionalidad.SetFocus End Sub

Private Sub situacion_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 salud.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub situacion_LostFocus() situacion = StrConv(situacion.Text, vbProperCase) End Sub

Private Sub vivecon_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(nombre.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 padre.SetFocus Case Else KeyAscii = 0

110

End Select End Sub

Private Sub vivecon_LostFocus() vivecon = StrConv(vivecon.Text, vbProperCase) End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 ' Boton Modificar: Activar Todo bloquear (True) boton(1).Enabled = False boton(0).Enabled = False nombre.Text = Nomb Case 1 ' Boton Eliminar: Comprobar si tiene registros nombre.Text = Nomb Tabla.Open "Select count(numero) as total from matriculas where AlumnoId = " & BuscarOpcion, Base.ConnectionString, adOpenForwardOnly If Tabla!total > 0 Then MsgBox "El estudiante " & Nomb & ", no se puede eliminar debido a que ha sido registrado en la tabla de matrculas.", vbExclamation, "Alumno contiene " & Tabla!total Tabla.Close Set Tabla = Nothing Exit Sub End If Tabla.Close Set Tabla = Nothing If MsgBox("Est seguro de querer eliminar al estudiante " & Nomb & ", del sistema para siempre?", vbInformation + vbYesNo) = vbYes Then Base.Execute "Delete * from datos where AlumnoId = " & BuscarOpcion

111

MsgBox "Estudiante " & Nomb & ", eliminado totalmente de la base de datos", vbInformation Nomb = "" BuscarOpcion = "0" Limpiar bloquear (False) End If Case 2 ' Boton guardar If Year(Date) - Year(nacido.Value) < 4 Then If MsgBox("La edad mnima del estudiante debe ser a partir de los 4 aos. An as desea continuar?", vbYesNo + vbExclamation, "Edad seleccionada = " & Year(Date) - Year(nacido.Value)) = vbNo Then Exit Sub End If Base.Execute "Update datos set nombre = '" & nombre.Text & "', lnacimiento = '" & Left(lnacido.Text, 30) & "', fecha = '" & nacido.Value & "', Procedencia = '" & Left(procedencia.Text, 30) & "', Ciudad = '" & Left(ciudad.Text, 30) & "',claseescuela = '" & Left(claseescuela.Text, 20) & "', anioescuela = '" & Left(anioescolar.Text, 20) & "', calificacion = " & Val(calificacion) & ", origenmatricula = '" & Left(origenmatricula.Text, 30) & "',nacionalidad = '" & Left(nacionalidad.Text, 20) & "',vivecon = '" & Left(vivecon.Text, 40) & "',fono = '" & fono.Text & "',padre = '" & padre.Text & "', madre = '" & madre.Text & "',Direapoderado = '" & direcciona.Text & "',OcupacionP = '" & ocupacionp.Text & "',OcupacionM = '" & ocupacionm.Text & "',Situacion = '" &

Left(situacion.Text, 10) & "',salud = '" & Left(salud.Text, 20) & "',sexo = " & Sex & " Where AlumnoId = " & BuscarOpcion Nomb = nombre.Text MsgBox "Estudiante " & Nomb & ", modificado a perfeccin", vbInformation, "Estudiante modificado" bloquear (False) boton(0).Enabled = True boton(1).Enabled = True Case Else

112

Unload mestudiante End Select Exit Sub salir: If MsgBox(Err.Description, vbRetryCancel + vbQuestion, Err.Number) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub Command1_Click() bloquear (False) LlenarCombos boton(2).Enabled = False BuscarOpcion = "Select AlumnoId, Nombre from datos where left(nombre," & Len(nombre.Text) & ") = '" & nombre.Text & "' order by nombre;" Cuenta = "Select count(Nombre) as total from datos where left(nombre," & Len(nombre.Text) & ") = '" & nombre.Text & "'" consulta.Show 1 If BuscarOpcion = "0" Then bloquear (False): Limpiar: Exit Sub Tabla.Open "Select * from datos where alumnoid = " & BuscarOpcion, Base.ConnectionString, adOpenForwardOnly boton(0).Enabled = True boton(1).Enabled = True LlenarDatos Tabla.Close Set Tabla = Nothing boton(2).Enabled = False boton(0).SetFocus End Sub

Private Sub LlenarDatos() On Error GoTo salir Nomb = Tabla!nombre

113

nombre.Text = Tabla!nombre If Tabla!lnacimiento <> "" Then lnacido.Text = Tabla!lnacimiento Else lnacido.Text = "" If Tabla!vivecon <> "" Then vivecon.Text = Tabla!vivecon Else vivecon.Text = "" If Tabla!procedencia <> "" Then procedencia.Text = Tabla!procedencia Else procedencia.Text = "" If Tabla!ciudad <> "" Then ciudad.Text = Tabla!ciudad Else ciudad.Text = "" If Tabla!claseescuela <> "" Then claseescuela.Text = Tabla!claseescuela Else claseescuela.Text = "" If Tabla!AnioEscuela <> "" Then anioescolar.Text = Tabla!AnioEscuela Else anioescolar.Text = "" If Tabla!calificacion <> "" Then calificacion.Text = Tabla!calificacion Else calificacion.Text = "" If Tabla!origenmatricula <> "" Then origenmatricula.Text =

Tabla!origenmatricula Else origenmatricula.Text = "" If Tabla!nacionalidad <> "" Then nacionalidad.Text = Tabla!nacionalidad Else nacionalidad.Text = "" If Tabla!fono <> "" Then fono.Text = Tabla!fono Else fono.Text = "" If Tabla!direapoderado <> "" Then direcciona.Text = Tabla!direapoderado Else direcciona.Text = "" If Tabla!padre <> "" Then padre.Text = Tabla!padre Else padre.Text = "" If Tabla!madre <> "" Then madre.Text = Tabla!madre Else madre.Text = "" If Tabla!ocupacionp <> "" Then ocupacionp.Text = Tabla!ocupacionp Else ocupacionp.Text = "" If Tabla!ocupacionm <> "" Then ocupacionm.Text = Tabla!ocupacionm Else ocupacionm.Text = "" If Tabla!situacion <> "" Then situacion.Text = Tabla!situacion Else situacion.Text = "" If Tabla!salud <> "" Then salud.Text = Tabla!salud Else salud.Text = "" If Tabla!padre <> "" Then padre.Text = Tabla!padre Else padre.Text = "" If Tabla!fecha <> "" Then nacido.Value = Tabla!fecha

114

Sexo(Tabla!Sexo).Value = True Sex = Tabla!Sexo Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarDatos Else Unload Me End Sub

Private Sub bloquear(opcion As Boolean) ciudad.Enabled = opcion direcciona.Enabled = opcion nacionalidad.Enabled = opcion situacion.Enabled = opcion vivecon.Enabled = opcion salud.Enabled = opcion lnacido.Enabled = opcion padre.Enabled = opcion nacido.Enabled = opcion ocupacionp.Enabled = opcion madre.Enabled = opcion fono.Enabled = opcion procedencia.Enabled = opcion anioescolar.Enabled = opcion claseescuela.Enabled = opcion calificacion.Enabled = opcion origenmatricula.Enabled = opcion ocupacionm.Enabled = opcion fono.Enabled = opcion boton(0).Enabled = opcion boton(1).Enabled = opcion boton(2).Enabled = opcion Frame1.Enabled = opcion

115

Sexo(0).Enabled = opcion Sexo(1).Enabled = opcion For i% = 1 To 18 Label1(i%).Enabled = opcion Next End Sub

Private Sub Limpiar() nombre.Text = "" ciudad.Text = "" direcciona.Text = "" nacionalidad.Text = "" situacion.Text = "" procedencia.Text = "" anioescolar.Text = "" calificacion.Text = "" claseescuela.Text = "" origenmatricula.Text = "" vivecon.Text = "" salud.Text = "" lnacido.Text = "" padre.Text = "" ocupacionp.Text = "" fono.Text = "" madre.Text = "" ocupacionm.Text = "" fono.Text = "" End Sub

Private Sub Form_Load() bloquear (False) nacido.Value = Date

116

nacido.MaxDate = Date Sex = 0 Sexo(0).Value = True End Sub

Private Sub LlenarCombos() lnacido.Clear procedencia.Clear ciudad.Clear origenmatricula.Clear anioescolar.Clear claseescuela.Clear nacionalidad.Clear vivecon.Clear situacion.Clear salud.Clear Set Tabla = Base.Execute("Select DISTINCT lnacimiento FROM DATOS Where Lnacimiento <> '' order by lnacimiento") While Not Tabla.EOF lnacido.AddItem Tabla!lnacimiento Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT procedencia FROM Datos Where Procedencia <> '' order by procedencia") While Not Tabla.EOF procedencia.AddItem Tabla!procedencia Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing

117

Set Tabla = Base.Execute("Select DISTINCT Ciudad from datos Where Ciudad <> '' order by ciudad") While Not Tabla.EOF ciudad.AddItem Tabla!ciudad Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT OrigenMatricula from datos where OrigenMatricula <> '' order by OrigenMatricula") While Not Tabla.EOF origenmatricula.AddItem Tabla!origenmatricula Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Nacionalidad from datos Where Nacionalidad <> '' order by nacionalidad") While Not Tabla.EOF nacionalidad.AddItem Tabla!nacionalidad Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Vivecon from datos Where vivecon <> '' order by vivecon") While Not Tabla.EOF vivecon.AddItem Tabla!vivecon Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing

118

Set Tabla = Base.Execute("Select DISTINCT Situacion from datos Where Situacion <> '' order by Situacion") While Not Tabla.EOF situacion.AddItem Tabla!situacion Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT Salud from datos Where salud <> '' order by salud") While Not Tabla.EOF salud.AddItem Tabla!salud Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT AnioEscuela from datos Where AnioEscuela <> '' order by AnioEscuela") While Not Tabla.EOF anioescolar.AddItem Tabla!AnioEscuela Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT ClaseEscuela from datos Where ClaseEscuela <> '' order by ClaseEscuela") While Not Tabla.EOF claseescuela.AddItem Tabla!claseescuela Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing

119

End Sub

1.12. FORMULARIO REGISTRAR MATRICULA

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 ado.Refresh busc.Text = "" LlenarCurso LlenarMateria Set Tabla = Base.Execute("Select (Max(numero) + 1) as numero from matriculas where lectivo = " & Year(Date)) If IsNull(Tabla!numero) Then numero = 1 Else numero = Val(Tabla!numero) Tabla.Close Set Tabla = Nothing bloquear (True) Case 1 If Len(curso) = 0 Then MsgBox "Campo vacio", vbExclamation curso.SetFocus Exit Sub ElseIf Len(representa) = 0 Then MsgBox "Campo vacio", vbExclamation representa.SetFocus Exit Sub ElseIf Len(obs) = 0 Then MsgBox "Campo vacio", vbExclamation obs.SetFocus

120

Exit Sub End If If curso.ListIndex = -1 Or Val(nombre.BoundText) = 0 Then MsgBox "Seleccione toda la informacin antes de continuar", vbExclamation: Exit Sub If MaxAlumnos > 0 Then Tabla.Open "Select count(*) + 1 as total from matriculas where idcurso = " & curso.ItemData(curso.ListIndex) & " and lectivo = " & Year(Date),

Base.ConnectionString, adOpenStatic If Tabla!total > MaxAlumnos Then MsgBox "No se pueden registrar ms de " & MaxAlumnos & " en el ao bsico seleccionado", vbExclamation, "Limite del curso lleno" Tabla.Close Set Tabla = Nothing curso.SetFocus Exit Sub End If Tabla.Close Set Tabla = Nothing End If Tabla.Open "Select count(alumnoid) + 1 as total from matriculas where alumnoid = " & Val(nombre.BoundText) & " and lectivo = " & Year(Date), Base.ConnectionString, adOpenForwardOnly If Tabla!total > 1 Then MsgBox "El estudiante " & busc.Text & " ya ha sido matriculado en este ao lectivo", vbExclamation, "Alumno ya matriculado" Tabla.Close Set Tabla = Nothing busc.SetFocus Exit Sub End If Tabla.Close Set Tabla = Nothing

121

Base.Execute

"Insert

Into

matriculas(numero,lectivo,AlumnoId,

IdCurso,Representante, fecha) values(" & Val(numero.Text) & "," & Year(Date) & "," & Val(nombre.BoundText) & "," & curso.ItemData(curso.ListIndex) & ",'" & representa.Text & "','" & Format(Now, "dd/mm/yyyy") & "')" MsgBox "Alumno matriculado a perfeccin", vbInformation bloquear (False) Case Else Unload Me ' Salir End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub busc_Change() nombre.Text = busc.Text If Len(busc) = 0 Then nombre.Visible = False Else nombre.Visible = True End Sub

Private Sub busc_KeyDown(KeyCode As Integer, Shift As Integer) If Len(busc) > 0 Then Select Case KeyCode Case 40, 38 If nombre.Visible = True Then nombre.SetFocus End Select End If End Sub

Private Sub busc_KeyPress(KeyAscii As Integer) Select Case KeyAscii

122

Case 13 If Not IsNull(nombre.SelectedItem) Then curso.SetFocus End If End Select End Sub

Private Sub LlenarCurso() On Error GoTo salir Tabla.Open "Select * from curso order by nombre", Base.ConnectionString, adOpenDynamic curso.Clear While Not Tabla.EOF curso.AddItem Tabla!nombre curso.ItemData(curso.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCurso Else Unload Me End Sub

Private Sub curso_Click() LlenarMateria End Sub

Private Sub Form_Load() On Error GoTo salir lectivo.Text = Year(Date)

123

If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If ado.ConnectionString = Base.ConnectionString ado.RecordSource = "Select datos.Nombre, datos.AlumnoId from datos order by datos.nombre" bloquear (False) materia.Rows = 1 central.MousePointer = vbNormal Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then Form_Load Else Unload Me End Sub

Private Sub bloquear(opcion As Boolean) nombre.Enabled = opcion numero.Enabled = opcion lectivo.Enabled = opcion materia.Enabled = opcion If opcion = False Then materia.ForeColorFixed = &H8000000C Else materia.ForeColorFixed = RGB(0, 0, 0) End If curso.Enabled = opcion obs.Enabled = opcion busc.Enabled = opcion boton(0).Enabled = Not opcion boton(1).Enabled = opcion representa.Enabled = opcion

124

For i% = 0 To 5 Label1(i%).Enabled = opcion Next End Sub

Private Sub nombre_DblClick(Area As Integer) nombre_KeyPress (13) End Sub

Private Sub nombre_GotFocus() SendKeys "{Down}" End Sub

Private Sub nombre_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 13 busc.Text = nombre.Text nombre.Visible = False curso.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub LlenarMateria() On Error GoTo salir materia.Clear materia.Rows = 1 materia.FormatString = "Materia|Profesor" materia.ColWidth(0) = 3500 materia.ColWidth(1) = 3500 If curso.ListIndex = -1 Then Exit Sub

125

Set Tabla = Base.Execute("Select materias.nombre as Materia, profesores.nombre as Profesor from aux, materias, profesores where materias.materiaid = aux.materiaid and profesores.profesorid = aux.profesorid and aux.anioid = " & curso.ItemData(curso.ListIndex) & " order by materias.nombre") While Not Tabla.EOF With materia .Rows = .Rows + 1 .Row = .Rows - 1 .Col = 0 .Text = Tabla!materia .Col = 1 .Text = Tabla!profesor End With Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarMateria Else Unload Me End Sub

Private Sub obs_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(obs.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case Else KeyAscii = 0

126

End Select End Sub

Private Sub obs_LostFocus() obs = StrConv(obs, vbProperCase) End Sub

Private Sub representa_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(representa.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 obs.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub representa_LostFocus() representa = StrConv(representa, vbProperCase) End Sub

1.13. FORMULARIO ACTUALIZACIN DE MATRICULAS

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index

127

Case 0 bloquear (True) boton(0).Enabled = False boton(1).Enabled = False boton(2).Enabled = True If curso.Enabled = True Then curso.SetFocus Case 1 Base.Execute "Delete * from matriculas where numero = " &

nombre.ItemData(nombre.ListIndex) & " and lectivo = " & Year(Date) bloquear (False) curso.ListIndex = -1 representa.Text = "" obs.Text = "" LlenarAlumnos MsgBox "Estudiante eliminado a perfeccin del sistema", vbInformation Case 2 Base.Execute "Update matriculas set idcurso = " &

curso.ItemData(curso.ListIndex) & ", Representante = '" & representa.Text & "', observacion = '" & obs.Text & "' where numero = " &

nombre.ItemData(nombre.ListIndex) & " and lectivo = " & Year(Date) curso.ListIndex = -1 representa.Text = "" obs.Text = "" LlenarAlumnos bloquear (False) boton(0).Enabled = False MsgBox "Estudiante modificado a perfeccin", vbInformation Case 3 Unload Me End Select Exit Sub salir:

128

Select Case Err.Number Case Existente MsgBox "El estudiante seleccionado tiene notas registradas en el sistema, por este motivo no se lo debe eliminar.", vbExclamation Case Else If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Select End Sub

Private Sub bloquear(opcion As Boolean) nombre.Enabled = Not opcion materia.Enabled = opcion If opcion = False Then materia.ForeColorFixed = &H8000000C Else materia.ForeColorFixed = RGB(0, 0, 0) End If curso.Enabled = opcion obs.Enabled = opcion boton(0).Enabled = opcion boton(1).Enabled = opcion boton(2).Enabled = opcin representa.Enabled = opcion Label1(0).Enabled = Not opcion Label1(4).Enabled = Not opcion For i% = 1 To 3 Label1(i%).Enabled = opcion Next End Sub

Private Sub curso_Click()

129

LlenarMateria End Sub

Private Sub Form_Load() bloquear (False) LlenarAlumnos LlenarCurso lectivo.Text = Year(Date) End Sub

Private Sub LlenarAlumnos() On Error GoTo salir nombre.Clear Tabla.Open "Select nombre, numero from datos, matriculas where lectivo = " & Year(Date) & " and datos.alumnoid = matriculas.alumnoid",

Base.ConnectionString, adOpenDynamic 'Set tabla = Base.Execute("Select nombre, numero from datos, matriculas where lectivo = " & Year(Date) & " and datos.alumnoid = matriculas.alumnoid", Base.ConnectionString, adOpenDynamic) While Not Tabla.EOF nombre.AddItem Tabla!nombre nombre.ItemData(nombre.NewIndex) = Tabla!numero Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarAlumnos Else Unload Me End Sub

130

Private Sub LlenarCurso() On Error GoTo salir Tabla.Open "Select * from curso order by nombre", Base.ConnectionString, adOpenDynamic While Not Tabla.EOF curso.AddItem Tabla!nombre curso.ItemData(curso.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCurso Else Unload Me End Sub

Private Sub nombre_Click() On Error GoTo salir If nombre.ListIndex = -1 Then Exit Sub Set Tabla = Base.Execute("Select idcurso, representante, observacion from matriculas where numero = " & nombre.ItemData(nombre.ListIndex) & " and lectivo = " & Year(Date)) If Not Tabla.EOF Then If Not IsNull(Tabla!representante) Then representa.Text = Tabla!representante If Not IsNull(Tabla!observacion) Then obs.Text = Tabla!observacion For i% = 0 To curso.ListCount - 1 If Tabla!idcurso = curso.ItemData(i%) Then Tabla.Close Set Tabla = Nothing curso.ListIndex = i% Exit For

131

End If Next End If If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If boton(0).Enabled = True boton(1).Enabled = True Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then nombre_Click Else Unload Me End Sub

Private Sub LlenarMateria() On Error GoTo salir materia.Clear materia.Rows = 1 materia.FormatString = "Materia|Profesor" materia.ColWidth(0) = 3500 materia.ColWidth(1) = 3500 If curso.ListIndex = -1 Then Exit Sub Set Tabla = Base.Execute("Select materias.nombre as Materia, profesores.nombre as Profesor from aux, materias, profesores where materias.materiaid = aux.materiaid and profesores.profesorid = aux.profesorid and aux.anioid = " & curso.ItemData(curso.ListIndex) & " order by materias.nombre") While Not Tabla.EOF With materia .Rows = .Rows + 1 .Row = .Rows - 1 .Col = 0

132

.Text = Tabla!materia .Col = 1 .Text = Tabla!profesor End With Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarMateria Else Unload Me End Sub

Private Sub obs_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 32 If Len(obs.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case Else KeyAscii = 0 End Select End Sub

Private Sub obs_LostFocus() obs = StrConv(obs, vbProperCase) End Sub

Private Sub representa_KeyPress(KeyAscii As Integer) Select Case KeyAscii

133

Case 32 If Len(representa.Text) = 0 Then KeyAscii = 0 Case 65 To 90, 97 To 122, 8 Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 13 obs.SetFocus Case Else KeyAscii = 0 End Select End Sub

Private Sub representa_LostFocus() representa = StrConv(representa, vbProperCase) End Sub

1.14. FORMULARIO INGRESO DE NOTAS

Dim Tabla As New ADODB.Recordset

Private Sub anio_Click() ciclo_Click End Sub

Private Sub anio_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 If Len(anio.Text) > 3 Then KeyAscii = 0 Case 8 Case Else KeyAscii = 0 End Select

134

End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 LlenarCiclo bloquear (True) boton(1).Enabled = False Case 1 For i% = 1 To nota.Rows - 1 nota.Row = i% nota.Col = 1 S$ = "Update notas set tareas = " & nota.Text nota.Col = 2 S$ = S$ & ", varios = " & Val(nota.Text) & "," nota.Col = 3 S$ = S$ & " aporte = " & Val(nota.Text) & "," nota.Col = 4 S$ = S$ & " examen = " & Val(nota.Text) & "," nota.Col = 5 S$ = S$ & " promedio = " & Val(nota.Text) & "," nota.Col = 6 S$ = S$ & " conducta = " & Val(nota.Text) S$ = S$ & " where numero = " & Val(alumno.BoundText) & " and lectivo = " & Val(anio.Text) & " and materiaid = " & nota.RowData(i%) & " and trimestre = " & Val(parcial.Text) Base.Execute S$ Next MsgBox "Notas registradas a perfeccin", vbInformation bloquear (False) Case 2

135

Unload Me End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub ciclo_Click() alumno.Text = "" If ciclo.ListIndex = -1 Then Exit Sub nombre.RecordSource = "Select datos.nombre, matriculas.numero from datos inner join matriculas on datos.alumnoid matriculas.Idcurso = " & = matriculas.alumnoid where & " and

ciclo.ItemData(ciclo.ListIndex)

matriculas.lectivo = " & Val(anio.Text) nombre.Refresh End Sub

Private Sub Form_Load() nombre.ConnectionString = Base.ConnectionString nota.Rows = 1 UpDown1.Max = MaxParciales anio.ListIndex = ListCount - 1 bloquear (False) End Sub

Private Sub bloquear(opcion As Boolean) Frame1(0).Enabled = opcion Frame1(1).Enabled = opcion ciclo.Enabled = opcion If opcion = True Then

136

nombre.RecordSource = "Select datos.nombre, matriculas.numero from datos inner join matriculas on datos.alumnoid = matriculas.alumnoid where

matriculas.Idcurso = 0 and matriculas.lectivo = 0" nombre.Refresh alumno.Text = "" nota.Clear nota.FormatString = "Materia|Tareas|Varios|Aporte|Examen|Promedio|Conducta" nota.ColWidth(0) = 1700 nota.Rows = 1 For i% = 1 To nota.Cols - 1 nota.ColWidth(i%) = 800 Next End If anio.Enabled = opcion alumno.Enabled = opcion muestra.Enabled = opcion boton(0).Enabled = Not opcion boton(1).Enabled = opcion nota.Enabled = opcion End Sub

Private Sub LlenarCiclo() On Error GoTo salir ciclo.Clear Set Tabla = Base.Execute("Select * from curso order by nombre") While Not Tabla.EOF ciclo.AddItem Tabla!nombre ciclo.ItemData(ciclo.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing

137

anio.Clear Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas group by lectivo order by lectivo") While Not Tabla.EOF anio.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCiclo Else Unload Me End Sub

Private Sub muestra_Click() On Error GoTo salir If ciclo.ListIndex = -1 Or Val(anio.Text) <= 0 Or Val(alumno.BoundText) = 0 Then Exit Sub Tabla.Open "Select count(numero) as Total from notas where numero = " & Val(alumno.BoundText) & " and lectivo = " & Val(anio.Text) & " and trimestre = " & UpDown1.Value, Base.ConnectionString, adOpenDynamic If Tabla!total > 0 Then Tabla.Close 'Set Tabla = Nothing Else Tabla.Close Set Tabla = Nothing Base.Execute ("Insert into notas(numero,lectivo,materiaid,trimestre) Select

materiaid-materiaid+ " & Val(alumno.BoundText) & " as codigo, materiaidmateriaid+ " & anio.Text & " as lectiv ,materiaid, materiaid-materiaid+" &

138

UpDown1.Value

&

"

as

trime

from

aux

where

anioid

"

&

ciclo.ItemData(ciclo.ListIndex)) Set Tabla = Base.Execute("select * from notas") Tabla.Requery Tabla.Close 'Set Tabla = Nothing End If nota.Clear nota.FormatString |Promedio|Conducta" nota.ColWidth(0) = 1700 nota.Rows = 1 For i% = 1 To nota.Cols - 1 nota.ColWidth(i%) = 800 Next Tabla.Open "Select Materias.Materiaid, from and materias, Materias.nombre, notas = where " & = "Materia |Tareas |Varios |Aporte | Examen

tareas,varios,aporte,examen,conducta materias.materiaid =

notas.materiaid

notas.numero

Val(alumno.BoundText) & " and notas.lectivo = " & Val(anio.Text) & " and notas.trimestre = " & Val(parcial.Text) & " order by materias.nombre" While Not Tabla.EOF With nota .Rows = .Rows + 1 .Row = .Rows - 1 .Col = 0 .RowData(.Rows - 1) = Tabla!MateriaId .Text = Tabla!nombre .Col = 1 .Text = Tabla!tareas .Col = 2 .Text = Tabla!varios .Col = 3

139

.Text = Tabla!aporte .Col = 4 .Text = Tabla!examen .Col = 5 .Text = (Tabla!tareas + Tabla!varios + Tabla!aporte + Tabla!examen) / 4 .Col = 6 .Text = Tabla!CONDUCTA End With Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Frame1(1).Enabled = False boton(1).Enabled = True alumno.Enabled = False anio.Enabled = False ciclo.Enabled = False muestra.Enabled = False Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then muestra_Click Else Unload Me End Sub

Private Sub nota_KeyDown(KeyCode As Integer, Shift As Integer) Dim promedio As Single If nota.Col <> 0 And nota.Col <> 5 Then If KeyCode = 46 Then nota.Text = 0 a% = nota.Col For i% = 1 To nota.Cols - 3 'estaba 2 nota.Col = i% promedio = promedio + Val(nota.Text)

140

Next promedio = promedio / 4 nota.Col = 5 nota.Text = Round(promedio, 2) nota.Col = a% End If End Sub

Private Sub nota_KeyPress(KeyAscii As Integer) On Error Resume Next Dim promedio As Single If nota.Col <> 0 And nota.Col <> 5 Then Select Case KeyAscii Case 48 To 57 nota.Text = Val(nota.Text) * 10 + (KeyAscii - 48) If nota.Text > MaxNota Then nota.Text = Int(nota.Text / 10) a% = nota.Col For i% = 1 To nota.Cols - 3 'estaba 2 nota.Col = i% promedio = promedio + Val(nota.Text) Next promedio = promedio / 4 nota.Col = 5 nota.Text = Round(promedio, 2) nota.Col = a% Case 8 nota.Text = 0 a% = nota.Col For i% = 1 To nota.Cols - 3 'estaba 2 nota.Col = i% promedio = promedio + Val(nota.Text) Next

141

promedio = promedio / 4 nota.Col = 5 nota.Text = Round(promedio, 2) nota.Col = a% Case 13 nota.Col = nota.Col + 1 If nota.Col = 5 Then nota.Row = nota.Row + 1: nota.Col = 1 Case Else KeyAscii = 0 End Select End If End Sub

1.15. FORMULARIO CREAR NUEVA CLAVE

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 bloquear (True) userid.Text = "" password(0).Text = "" password(1).Text = "" boton(1).Enabled = False userid.SetFocus Case 1 If password(0).Text <> password(1).Text Then MsgBox "Clave confirmada incorrectamente, Vuelva a intentarlo si desea continuar", vbInformation, "Clave incorrecta" Exit Sub

142

End If Set Tabla = Base.Execute("Select count(*) as total from usuarios where nombre = '" & userid.Text & "'") If Tabla!total > 0 Then MsgBox "Ya se ha registrado " & Tabla!total & " un usuario en el sistema con el mismo id. Si desea continuar cambie el valor del campo y vuelva a intentarlo", vbInformation, "Usuario ya registrado" Tabla.Close : Set Tabla = Nothing Exit Sub End If Tabla.Close : Set Tabla = Nothing Base.Execute "Insert into usuarios(nombre,clave) values('" & userid.Text & "','" & Encripta(password(0).Text, 1) & "')" bloquear (False) MsgBox "Usuario '" & userid.Text & "' agregado al sistema a perfeccin", vbInformation, "Usuario registrado" Case 2: Unload Me End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub Check1_Click() If Check1.Value Then Config.mascara = True password(0).PasswordChar = "*": password(1).PasswordChar = "*" Else Config.mascara = False password(0).PasswordChar = "": password(1).PasswordChar = "" End If

143

MenuVer End Sub

Private Sub Form_Load() If Config.mascara = True Then password(0).PasswordChar = "*" password(1).PasswordChar = "*" Check1.Value = 1 Else Check1.Value = 0 password(0).PasswordChar = "" password(1).PasswordChar = "" End If bloquear (False) End Sub

Private Sub password_Change(Index As Integer) boton(1).Enabled = prueba End Sub

Private Sub password_KeyPress(Index As Integer, KeyAscii As Integer) If KeyAscii = 13 Then If Index = 0 Then password(1).SetFocus Else If boton(1).Enabled = True Then boton(1).SetFocus End If End Sub

Private Sub userid_Change() boton(1).Enabled = prueba End Sub

Private Sub userid_KeyPress(KeyAscii As Integer)

144

If KeyAscii = 13 Then password(0).SetFocus End Sub

Private Sub bloquear(opcion As Boolean) userid.Enabled = opcion Label1(0).Enabled = opcion Label1(1).Enabled = opcion Label1(2).Enabled = opcion password(0).Enabled = opcion password(1).Enabled = opcion Frame1.Enabled = opcion boton(0).Enabled = Not opcion boton(1).Enabled = opcion End Sub

Private Function prueba() As Boolean If Len(RTrim(userid.Text)) = 0 Or Len(RTrim(password(0).Text)) = 0 Or Len(RTrim(password(1).Text)) = 0 Then prueba = False Else prueba = True End Function

Private Sub userid_LostFocus() userid = StrConv(userid, vbProperCase) End Sub

1.16. FORMULARIO MODIFICAR CLAVE

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0

145

bloquear (True) password(0).Text = "" password(1).Text = "" password(2).Text = "" boton(1).Enabled = False Case 1 Set Tabla = Base.Execute("Select clave from usuarios where iduser = " & nombre.ItemData(nombre.ListIndex)) If Tabla!clave <> Encripta(password(0).Text, 1) Then MsgBox "La contrasea actual es incorrecta. Cambie la contrasea y vuelva a intentarlo", vbExclamation, "Contrasea incorrecta" Tabla.Close Set Tabla = Nothing password(0).SetFocus Exit Sub End If Tabla.Close Set Tabla = Nothing If password(1).Text <> password(2).Text Then MsgBox "Contrasea confirmada incorrectamente. Vuelva a confirmar la contrase e intntelo de nuevo", vbExclamation, "Confirmacin incorrecta" password(1).SetFocus Exit Sub End If Base.Execute "Update Usuarios set clave = '" & Encripta(password(1).Text, 1) & "' where iduser = " & nombre.ItemData(nombre.ListIndex), 1 bloquear (False) boton(0).Enabled = False LlenarUsuarios password(0).Text = "" password(1).Text = "" password(2).Text = ""

146

MsgBox "Cambio de clave realizado a perfeccin.", vbInformation Case 2 Unload Me End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub Check1_Click() If Check1.Value Then Config.mascara = True password(0).PasswordChar = "*" password(1).PasswordChar = "*" password(2).PasswordChar = "*" Else Config.mascara = False password(0).PasswordChar = "" password(1).PasswordChar = "" password(2).PasswordChar = "" End If MenuVer End Sub

Private Sub Form_Load() LlenarUsuarios If Config.mascara = True Then Check1.Value = 1 password(0).PasswordChar = "*" password(1).PasswordChar = "*" password(2).PasswordChar = "*"

147

Else Check1.Value = 0 password(0).PasswordChar = "" password(1).PasswordChar = "" password(2).PasswordChar = "" End If bloquear (False) boton(0).Enabled = False End Sub

Private Sub LlenarUsuarios() On Error GoTo salir Set Tabla = Base.Execute("Select * from Usuarios order by nombre") nombre.Clear While Not Tabla.EOF nombre.AddItem Tabla!nombre nombre.ItemData(nombre.NewIndex) = Tabla!iduser Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarUsuarios Else Unload Me End Sub

Private Sub bloquear(opcion As Boolean) nombre.Enabled = Not opcion password(0).Enabled = opcion password(1).Enabled = opcion password(2).Enabled = opcion

148

Label1(0).Enabled = Not opcion Label1(1).Enabled = opcion Label1(2).Enabled = opcion Label1(3).Enabled = opcion boton(0).Enabled = Not opcion boton(1).Enabled = opcion End Sub

Private Sub nombre_Click() If nombre.ListIndex = -1 Then boton(0).Enabled = False Else boton(0).Enabled = True End Sub

Private Sub password_Change(Index As Integer) boton(1).Enabled = prueba End Sub

Private Sub password_KeyPress(Index As Integer, KeyAscii As Integer) If KeyAscii = 13 Then If Index < 2 Then password(Index + 1).SetFocus Else boton(1).SetFocus End If End If End Sub

Private Function prueba() As Boolean If password(0).Text = "" Or password(1).Text = "" Or password(2).Text = "" Then prueba = False Else prueba = True End Function

149

1.17. FORMULARIO ELIMINAR CLAVE

Dim Tabla As New ADODB.Recordset

Private Sub LlenarUsuarios() On Error GoTo salir Set Tabla = Base.Execute("Select * from Usuarios order by nombre") nombre.Clear While Not Tabla.EOF nombre.AddItem Tabla!nombre nombre.ItemData(nombre.NewIndex) = Tabla!iduser Tabla.MoveNext Wend Tabla.Close Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarUsuarios Else Unload Me End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 Tabla.Open "Select clave from usuarios where iduser = " &

nombre.ItemData(nombre.ListIndex) If Tabla!clave <> Encripta(password.Text, 1) Then Tabla.Close MsgBox "La clave del usuario seleccionado para ser eliminado del sistema es incorrecta. Cambie la clave y vuelva a intentarlo.", vbExclamation, "Error de clave" password.SetFocus

150

Exit Sub End If Tabla.Close Base.Execute "Delete * from usuarios where iduser = " &

nombre.ItemData(nombre.ListIndex) MsgBox "Usuario: " & nombre.Text & " eliminado del sistema correctamente. ", vbInformation, "Usuario eliminado" boton(0).Enabled = False password.Text = "" LlenarUsuarios Case 1: Unload Me End Select Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then boton_Click (Index) Else Unload Me End Sub

Private Sub Form_Load() LlenarUsuarios boton(0).Enabled = False End Sub

Private Function prueba() As Boolean If nombre.ListIndex = -1 Or password.Text = "" Then prueba = False Else prueba = True End Function

Private Sub nombre_Click() boton(0).Enabled = prueba End Sub

151

Private Sub password_Change() boton(0).Enabled = prueba End Sub

1.18. FORMULARIO CONFIGURACIN

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) Select Case Index Case 0 atras: If Base.State = 0 Then S$ = Server Server = pathserver.Text a$ = AbrirBase If a$ <> "" Then If MsgBox("No se ha podido establecer una conexin con la base de datos. Motivo: - " & a$ & "-", vbRetryCancel + vbInformation) = vbRetry Then GoTo atras MsgBox "El sistema debe estar conectado a la base de datos para trabajar", vbCritical Server = S$ Unload Me Exit Sub End If MenuVer MsgBox "Para que los cambios den resultado se va a" & vbCr & " cerrar el programa y volvera a abrir", vbInformation DirectorInstitucion = Director.Text NombreInstitucion = nombre.Text DireccionInstitucion = Dire.Text

152

MaxNota = Val(nmaxima) MaxAlumnos = Val(maxalum) MaxParciales = Val(parciales) Base.Execute "Insert Into

institucion(nombre,direccion,director,nmaxima,maxalumnos,nparciales) values('" & NombreInstitucion & "','" & DireccionInstitucion & "','" & DirectorInstitucion & "'," & MaxNota & "," & MaxAlumnos & "," & MaxParciales & ")" Else Base.Execute "delete * from institucion" DirectorInstitucion = Director.Text NombreInstitucion = nombre.Text DireccionInstitucion = Dire.Text MaxNota = Val(nmaxima) MaxAlumnos = Val(maxalum) MaxParciales = Val(parciales) Base.Execute "Insert Into

institucion(nombre,direccion,director,nmaxima,maxalumnos,nparciales) values('" & NombreInstitucion & "','" & DireccionInstitucion & "','" & DirectorInstitucion & "'," & MaxNota & "," & MaxAlumnos & "," & MaxParciales & ")" End If Unload Me 'Unload central 'Load central 'central.Show Case 1 Unload Me End Select End Sub

Private Sub Command1_Click() On Error GoTo salir If Base.State = 1 Then

153

If MsgBox("La base de datos est abierta. An as desea continuar", vbQuestion + vbYesNo) <> vbYes Then Exit Sub Base.Close End If dialogo.FileName = "Datos.mdb" dialogo.CancelError = True dialogo.Filter = "Base de datos del sistema | escuela.mdb" dialogo.ShowOpen pathserver = dialogo.FileName salir: Exit Sub End Sub

Private Sub Dire_KeyPress(Tecla As Integer) Select Case Tecla Case Asc("a") To Asc("z") Case Asc("A") To Asc("Z") Case Asc("0") To Asc("9") Case Asc(""), Asc(""), Asc("") Case Asc(""), Asc(""), Asc(""), Asc("") Case 8, 32 Case 13 Director.SetFocus Case Else Tecla = 0 End Select End Sub

Private Sub Dire_LostFocus() Dire = StrConv(Dire, vbProperCase) End Sub

154

Private Sub Director_KeyPress(Tecla As Integer) Select Case Tecla Case Asc("a") To Asc("z") Case Asc("A") To Asc("Z") Case Asc(""), Asc(""), Asc("") Case Asc(""), Asc(""), Asc(""), Asc("") Case 8, 32 Case 13 boton(0).SetFocus Case Else Tecla = 0 End Select End Sub

Private Sub Director_LostFocus() Director = StrConv(Director, vbProperCase) End Sub

Private Sub Form_Load() If Base.State <> 0 Then nombre.Text = NombreInstitucion Dire.Text = DireccionInstitucion Director.Text = DirectorInstitucion pathserver.Text = Server maxalum = MaxAlumnos parciales.Text = MaxParciales nmaxima.Text = MaxNota esta.Clear If Base.State = 1 Then esta.AddItem "La base de datos esta correctamente conectada y lista para trabajar" esta.AddItem "Ubicacin de la base de datos: " & Server esta.AddItem "Fin del informe"

155

End If End If End Sub

Private Sub max_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 Case 8 Case Else KeyAscii = 0 End Select End Sub

Private Sub maxalum_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 Case 8 Case Else KeyAscii = 0 End Select End Sub

Private Sub nmaxima_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57, 8 Case 13 maxalum.SetFocus Case Else KeyAscii = 0 End Select End Sub

156

Private Sub nombre_KeyPress(Tecla As Integer) Select Case Tecla Case Asc("a") To Asc("z") Case Asc("A") To Asc("Z") Case Asc(""), Asc(""), Asc(""), Asc(""), Asc("") Case Asc(""), Asc("") Case 8, 32 Case 13: Dire.SetFocus Case Else: Tecla = 0 End Select End Sub

Private Sub nombre_LostFocus() nombre = StrConv(nombre, vbProperCase) End Sub

Private Sub parciales_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 Case 8 Case 13: nmaxima.SetFocus Case Else: KeyAscii = 0 End Select End Sub

1.19. FORMULARIO MEJORES ESTUDIANTES DEL PERIODO

Dim Tabla As New ADODB.Recordset

Private Sub LlenarLectivo() If Tabla.State = 1 Then Tabla.Close

157

Set Tabla = Nothing End If Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") lectivo.Clear While Not Tabla.EOF lectivo.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close End Sub

Private Sub boton_Click(Index As Integer) Select Case Index Case 0 On Error GoTo Trata If lectivo.ListIndex = -1 Then MsgBox "Debe seleccionar el ao lectivo del cual desee mostrar la informacin requerida", vbExclamation: Exit Sub If Tabla.State = 1 Then Tabla.Close End If Tabla.Open "SELECT Datos.Nombre, Matriculas.Numero, Curso.nombre as curso, Avg(Notas.Promedio) AS Promedio " & _ "FROM Curso INNER = JOIN ((Datos INNER JOIN Matriculas Notas ON ON =

Datos.AlumnoId (Matriculas.Lectivo

Matriculas.AlumnoId) = Notas.Lectivo)

INNER AND

JOIN

(Matriculas.Numero

Notas.Numero)) ON Curso.IdAnio = Matriculas.Idcurso " & _ "GROUP BY Datos.Nombre, Matriculas.Numero, Curso.nombre,

matriculas.lectivo " & _ "HAVING (((Matriculas.Lectivo)= " & Val(lectivo.Text) & ")) " & _ "ORDER BY Avg(Notas.Promedio) DESC;" Set mejores.DataSource = Tabla

158

mejores.Sections("cab").Controls("desde").Caption = lectivo.Text & "-" & Val(lectivo.Text) + 1 mejores.Sections("deta").Controls("numero").DataField = "numero" mejores.Sections("deta").Controls("nombre").DataField = "nombre" mejores.Sections("deta").Controls("ciclo").DataField = "curso" mejores.Sections("deta").Controls("promedio").DataField = "promedio" mejor.Hide mejores.Refresh mejores.Show Exit Sub Trata: Case 1 mejor.Hide End Select End Sub

Private Sub Form_Load() LlenarLectivo End Sub

1.20. FORMULARIO LISTA DE ESTUDIANTES POR AO BSICA

Dim Tabla As New ADODB.Recordset

Private Sub boton_Click(Index As Integer) Select Case Index Case 0 On Error GoTo Trata FRMEstudiantes2.ssQLL = "SELECT matriculas.numero, datos.Nombre AS Alunmo, notas.lectivo, curso.nombre AS grado, format(matriculas.fecha-

datos.fecha,'yy') AS Edad, representante From datos, matriculas, notas, curso WHERE datos.alumnoid=matriculas.alumnoid and

159

matriculas.numero=notas.numero matriculas.idcurso = " &

and

matriculas.idcurso=curso.idanio & "

and And

ciclo.ItemData(ciclo.ListIndex)

matriculas.lectivo = " & Val(lectivo.Text) & " GROUP BY matriculas.numero, datos.Nombre, notas.lectivo, curso.nombre, matriculas.fecha, datos.fecha,

matriculas.representante order by datos.nombre" FRMEstudiantes2.Show Exit Sub Trata: MsgBox "No hay datos que mostrar.", vbExclamation Case 1 Unload Me End Select End Sub

Private Sub ciclo_Click() If lectivo.ListIndex <> -1 Then boton(0).Enabled = True End Sub

Private Sub Form_Load() LlenarCiclo LlenarLectivo boton(0).Enabled = False End Sub

Private Sub LlenarCiclo() Set Tabla = Base.Execute("Select * from curso") ciclo.Clear While Not Tabla.EOF ciclo.AddItem Tabla!nombre ciclo.ItemData(ciclo.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend

160

Tabla.Close Set Tabla = Nothing End Sub

Private Sub LlenarLectivo() Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") lectivo.Clear While Not Tabla.EOF lectivo.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing End Sub

Private Sub lectivo_Click() If ciclo.ListIndex <> -1 Then boton(0).Enabled = True End Sub

1.21. FORMULARIO NOTAS DEL AO BSICO POR MATERIA

Dim Tabla As New ADODB.Recordset

Private Sub LlenarCiclos() On Error GoTo salir ciclos.Clear Tabla.Open "Select * from curso order by nombre", Base.ConnectionString, adOpenDynamic While Not Tabla.EOF ciclos.AddItem Tabla!nombre ciclos.ItemData(ciclos.NewIndex) = Tabla!IdAnio

161

Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing lectivo.Clear Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") While Not Tabla.EOF lectivo.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbQuestion + vbRetryCancel) = vbRetry Then LlenarCiclos End Sub

Private Sub boton_Click(Index As Integer) On Error GoTo salir Select Case Index Case 0 If materias.ListIndex <> -1 And ciclos.ListIndex <> -1 And lectivo.ListIndex <> 1 And parcial.ListIndex <> -1 Then sql$ = "SELECT matriculas.numero, Datos.Nombre, Notas.Tareas, Notas.Varios, Notas.Aporte, Notas.Examen, Notas.Promedio" sql$ = sql$ & " FROM (Datos INNER JOIN Matriculas ON Datos.AlumnoId = Matriculas.AlumnoId) INNER JOIN Notas ON (Matriculas.Lectivo =

Notas.Lectivo) AND (Matriculas.Numero = Notas.Numero)" sql$ = sql$ & " WHERE Notas.MateriaId = " &

materias.ItemData(materias.ListIndex) & " AND Matriculas.Idcurso = " &

162

ciclos.ItemData(ciclos.ListIndex) & " AND Matriculas.Lectivo = " & lectivo.Text & " and notas.trimestre = " & Val(parcial.Text) & " order by datos.nombre, matriculas.numero;" Set Tabla = Base.Execute(sql$) If Not Tabla.EOF Then Set notacurso.DataSource = Tabla notacurso.Sections("enc").Controls("anio").Caption = ciclos.Text notacurso.Sections("enc").Controls("materia").Caption = materias.Text notacurso.Sections("enc").Controls("periodo").Caption = lectivo.Text & "-" & Val(lectivo.Text + 1) notacurso.Sections("enc").Controls("profesor").Caption = profe.Text notacurso.Sections("deta").Controls("numero").DataField = "numero" notacurso.Sections("deta").Controls("nombre").DataField = "nombre" notacurso.Sections("deta").Controls("tareas").DataField = "tareas" notacurso.Sections("deta").Controls("varios").DataField = "varios" notacurso.Sections("deta").Controls("aporte").DataField = "aporte" notacurso.Sections("deta").Controls("examen").DataField = "examen" notacurso.Sections("deta").Controls("promedio").DataField = "promedio" notasmaterias.Hide notacurso.Refresh notacurso.Show Else MsgBox "No existen notas para lo seleccionado", vbInformation ciclos.SetFocus Exit Sub End If Else MsgBox "Seleccione toda la informacin necesaria para poder mostrar el reporte", vbExclamation End If Case 1 Unload Me

163

End Select Exit Sub salir: If MsgBox(Err.Description, vbQuestion + vbRetryCancel) = vbRetry Then boton_Click (Index) End Sub

Private Sub LlenarMaterias() On Error GoTo salir materias.Clear Set Tabla = Base.Execute("Select materias.nombre, profesores.nombre materias.materiaid = as from profesor, materias, and " &

profesores.profesorid, profesores,aux

where =

materias.materiaid aux.profesorid and

aux.materiaid aux.anioid =

profesores.profesorid

ciclos.ItemData(ciclos.ListIndex)) While Not Tabla.EOF materias.AddItem Tabla!nombre materias.ItemData(materias.NewIndex) = Tabla!MateriaId profe.AddItem Tabla!profesor profe.ItemData(profe.NewIndex) = Tabla!profesorid Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbQuestion + vbRetryCancel) = vbRetry Then LlenarMaterias End Sub

Private Sub ciclos_Click() LlenarMaterias

164

End Sub

Private Sub Form_Load() If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If LlenarCiclos For i% = 1 To MaxParciales parcial.AddItem i% Next End Sub

Private Sub materias_Click() profe.ListIndex = materias.ListIndex End Sub

1.22. FORMULARIO NOTAS DEL ESTUDIANTE POR TRIMESTRE

Dim TablaNotas As New ADODB.Recordset Dim Tabla As New ADODB.Recordset

Private Sub anio_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Private Sub boton_Click(Index As Integer) Select Case Index Case 0 If Tabla.State = 1 Then Tabla.Close

165

Set Tabla = Nothing End If If alumnos.ListIndex = -1 And ciclo.ListIndex = -1 Then Exit Sub Set TablaNotas = Base.Execute("Select Materias.nombre,

notas.tareas,notas.varios,notas.aporte,notas.examen,notas.promedio from materias inner join notas on materias.materiaid = notas.materiaid where notas.numero = " & alumnos.ItemData(alumnos.ListIndex) & " and notas.lectivo = " & Val(anio.Text) & " and notas.trimestre = " & Val(parcial.Text) & " order by materias.nombre") Set NotaAlumno.DataSource = TablaNotas NotaAlumno.Sections("Enc").Controls("nombre").Caption = alumnos.Text NotaAlumno.Sections("Enc").Controls("Ciclo").Caption = ciclo.Text NotaAlumno.Sections("Enc").Controls("lectivo").Caption = anio.Text & "-" & Val(anio.Text) + 1 NotaAlumno.Sections("Deta").Controls("Materia").DataField = "nombre" NotaAlumno.Sections("Deta").Controls("Tareas").DataField = "tareas" NotaAlumno.Sections("Deta").Controls("Varios").DataField = "varios" NotaAlumno.Sections("Deta").Controls("Aporte").DataField = "Aporte" NotaAlumno.Sections("Deta").Controls("Examen").DataField = "examen" NotaAlumno.Sections("Deta").Controls("Promedio").DataField = "Promedio" ReportNotas.Hide NotaAlumno.Refresh Load NotaAlumno NotaAlumno.Show Case 1 ReportNotas.Hide End Select End Sub

Private Sub LlenarCiclo() On Error GoTo salir ciclo.Clear

166

If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If Set Tabla = Base.Execute("Select * from curso order by nombre") While Not Tabla.EOF ciclo.AddItem Tabla!nombre ciclo.ItemData(ciclo.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close: Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") While Not Tabla.EOF anio.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close: Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCiclo Else Unload Me End Sub

Private Sub ciclo_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Private Sub Form_Load() LlenarCiclo UpDown1.Max = MaxParciales

167

anio.ListIndex = ListCount - 1 End Sub

Private Sub LlenarAlumnos() If Tabla.State = 1 Then Tabla.Close : Set Tabla = Nothing End If alumnos.Clear Set Tabla = Base.Execute("Select datos.nombre, matriculas.numero from datos inner join matriculas on datos.alumnoid matriculas.Idcurso = " & = matriculas.alumnoid where & " and

ciclo.ItemData(ciclo.ListIndex)

matriculas.lectivo = " & Val(anio.Text)) While Not Tabla.EOF alumnos.AddItem Tabla!nombre alumnos.ItemData(alumnos.NewIndex) = Tabla!numero Tabla.MoveNext Wend Tabla.Close: Set Tabla = Nothing End Sub

1.23. FORMULARIO NOTAS GENERAL DEL ESTUDIANTE

Dim TablaNotas As New ADODB.Recordset Dim Tabla As New ADODB.Recordset

Private Sub anio_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Sub botonimprimir() LibretasEstudent.ssQLL1 = "SELECT *, " & _

168

"(select avg(notas.conducta) as C1 from datos,matriculas,notas,materias,aux,curso where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=1 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") as ProCon1, " & _ "(select avg(notas.conducta) as C2 from datos,matriculas,notas,materias,aux,curso where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=2 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") AS ProCon2, " & _ "(select avg(notas.conducta) as C3 from datos,matriculas,notas,materias,aux,curso where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=3 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") AS ProCon3, " & _ "((select avg(notas.conducta) as Cc1 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=1 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") + " & _ "(select avg(notas.conducta) as Cc2 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=2 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") + " & _

169

"(select

avg(notas.conducta)

as

Cc3

from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=3 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & "))/3 as ProConGene, " &_ "(select avg(notas.promedio) as Ccc1 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=1 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") as ProAprov1, " & _ "(select avg(notas.promedio) as Ccc2 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=2 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") AS ProAprov2, " & _ "(select avg(notas.promedio) as Ccc3 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=3 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") AS ProAprov3, " & _ "((select avg(notas.promedio) as Cccc1 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and

170

curso.idanio=aux.anioid

and

aux.materiaid=materias.materiaid

and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=1 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ") + " & _ "(select avg(notas.promedio) as Cccc2 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=2 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & ")+ " & _ "(select avg(notas.promedio) as Cccc3 from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=3 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & "))/3 as ProAprovGene "&_ "FROM [select distinct

materias.materiaid,materias.nombre,datos.nombre,notas.lectivo,notas.promedio as prom1,notas.conducta " & _ "From datos, matriculas, notas, materias, Aux, curso " & _ "where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=1 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " " & _ "group by

materias.materiaid,materias.nombre,datos.nombre,notas.lectivo,notas.promedio,no tas.conducta]. AS Trim1, [select distinct materias.materiaid,notas.lectivo, notas.promedio as prom2, notas.conducta " & _

171

"From datos, matriculas, notas, materias, Aux, curso " & _ "where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=2 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " " & _ "group by materias.materiaid,notas.lectivo, notas.promedio, notas.conducta]. AS Trim2, [select distinct materias.materiaid,notas.lectivo, notas.promedio as prom3, notas.conducta " & _ "From datos, matriculas, notas, materias, Aux, curso " & _ "where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=3 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " " & _ "group by materias.materiaid,notas.lectivo,notas.promedio,notas.conducta]. AS Trim3 " & _ "WHERE trim1.materiaid=trim2.materiaid and trim2.materiaid=trim3.materiaid and trim1.materiaid=trim3.materiaid"

LibretasEstudent.Show End Sub

Sub BotonImprime() Dim i As Long On Error GoTo salir If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If If alumnos.ListIndex = -1 Or ciclo.ListIndex = -1 Or anio.ListIndex = -1 Then Exit Sub 'Or Descripcion.ListIndex = -1

172

Set Tabla = Base.Execute("Select *, matriculas.numero, datos.nombre as AlumnoS1,curso.nombre as curso1,matriculas.lectivo from

datos,matriculas,curso,notas where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and matriculas.numero=notas.numero and

notas.numero = " & alumnos.ItemData(alumnos.ListIndex) & " and notas.lectivo = " & Val(anio.Text) & " order by datos.nombre") Set CertPromedioGener.DataSource = Tabla CertPromedioGener.Sections("Pagina").Controls("AnoLectivo").Caption anio.Text & " - " & Val(anio.Text) + 1 If Sexo = "1" Or Sexo = 1 Then 'CertfConducta.Sections("Pagina").Controls("Sexo").Caption = "la" 'CertfConducta.Sections("Pagina").Controls("Sexo1").Caption = "a" 'CertfConducta.Sections("Pagina").Controls("Sexo2").Caption = "a" Else 'CertfConducta.Sections("Pagina").Controls("Sexo").Caption = "el" 'CertfConducta.Sections("Pagina").Controls("Sexo1").Caption = "o" 'CertfConducta.Sections("Pagina").Controls("Sexo2").Caption = "o" End If CertPromedioGener.Sections("Pagina").Controls("Estudiante").Caption Tabla!alumnos1 i = MSF.Rows - 1 If i = 1 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) ElseIf i = 2 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) = = " & MSF2.TextMatrix(1, 2) & " = "& = = =

173

CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) ElseIf i = 3 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) ElseIf i = 4 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

= "&

174

CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) ElseIf i = 5 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

= "&

175

CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) ElseIf i = 6 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

176

CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) ElseIf i = 7 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & " " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & "

= "&

= "&

= "&

= "&

= "&

177

CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) ElseIf i = 8 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) " & MSF2.TextMatrix(1, 2) & " " & MSF2.TextMatrix(7, 2) & " " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & "

= "&

= "&

= "&

= "&

= "&

178

CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) ElseIf i = 9 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & " " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

= "&

179

CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("materias9").Caption MSF.TextMatrix(9, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & " " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

180

CertPromedioGener.Sections("pagina").Controls("NOTAS9").Caption MSF.TextMatrix(9, 2) & " MSF3.TextMatrix(9, 2) ElseIf i = 10 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("materias9").Caption MSF.TextMatrix(9, 1) CertPromedioGener.Sections("pagina").Controls("materias10").Caption MSF.TextMatrix(10, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & " " & MSF2.TextMatrix(9, 2) & "

= "&

= "&

= "&

181

CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS9").Caption MSF.TextMatrix(9, 2) & " MSF3.TextMatrix(9, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS10").Caption MSF.TextMatrix(10, 2) & " MSF3.TextMatrix(10, 2) ElseIf i = 11 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) " & MSF2.TextMatrix(10, 2) & " " & MSF2.TextMatrix(9, 2) & " " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & " " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

182

CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("materias9").Caption MSF.TextMatrix(9, 1) CertPromedioGener.Sections("pagina").Controls("materias10").Caption MSF.TextMatrix(10, 1) CertPromedioGener.Sections("pagina").Controls("materias11").Caption MSF.TextMatrix(11, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

= "&

183

CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS9").Caption MSF.TextMatrix(9, 2) & " MSF3.TextMatrix(9, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS10").Caption MSF.TextMatrix(10, 2) & " MSF3.TextMatrix(10, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS11").Caption MSF.TextMatrix(11, 2) & " MSF3.TextMatrix(11, 2) ElseIf i = 12 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) " & MSF2.TextMatrix(11, 2) & " " & MSF2.TextMatrix(10, 2) & " " & MSF2.TextMatrix(9, 2) & " " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & " " & MSF2.TextMatrix(6, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

184

CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("materias9").Caption MSF.TextMatrix(9, 1) CertPromedioGener.Sections("pagina").Controls("materias10").Caption MSF.TextMatrix(10, 1) CertPromedioGener.Sections("pagina").Controls("materias11").Caption MSF.TextMatrix(11, 1) CertPromedioGener.Sections("pagina").Controls("materias12").Caption MSF.TextMatrix(12, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

185

CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS9").Caption MSF.TextMatrix(9, 2) & " MSF3.TextMatrix(9, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS10").Caption MSF.TextMatrix(10, 2) & " MSF3.TextMatrix(10, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS11").Caption MSF.TextMatrix(11, 2) & " MSF3.TextMatrix(11, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS12").Caption MSF.TextMatrix(12, 2) & " MSF3.TextMatrix(12, 2) ElseIf i = 13 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) " & MSF2.TextMatrix(12, 2) & " " & MSF2.TextMatrix(11, 2) & " " & MSF2.TextMatrix(10, 2) & " " & MSF2.TextMatrix(9, 2) & " " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

186

CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("materias9").Caption MSF.TextMatrix(9, 1) CertPromedioGener.Sections("pagina").Controls("materias10").Caption MSF.TextMatrix(10, 1) CertPromedioGener.Sections("pagina").Controls("materias11").Caption MSF.TextMatrix(11, 1) CertPromedioGener.Sections("pagina").Controls("materias12").Caption MSF.TextMatrix(12, 1) CertPromedioGener.Sections("pagina").Controls("materias13").Caption MSF.TextMatrix(13, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

187

CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS9").Caption MSF.TextMatrix(9, 2) & " MSF3.TextMatrix(9, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS10").Caption MSF.TextMatrix(10, 2) & " MSF3.TextMatrix(10, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS11").Caption MSF.TextMatrix(11, 2) & " MSF3.TextMatrix(11, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS12").Caption MSF.TextMatrix(12, 2) & " MSF3.TextMatrix(12, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS13").Caption MSF.TextMatrix(13, 2) & " MSF3.TextMatrix(13, 2) ElseIf i = 14 Then CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) " & MSF2.TextMatrix(13, 2) & " " & MSF2.TextMatrix(12, 2) & " " & MSF2.TextMatrix(11, 2) & " " & MSF2.TextMatrix(10, 2) & " " & MSF2.TextMatrix(9, 2) & " " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

= "&

188

CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("materias9").Caption MSF.TextMatrix(9, 1) CertPromedioGener.Sections("pagina").Controls("materias10").Caption MSF.TextMatrix(10, 1) CertPromedioGener.Sections("pagina").Controls("materias11").Caption MSF.TextMatrix(11, 1) CertPromedioGener.Sections("pagina").Controls("materias12").Caption MSF.TextMatrix(12, 1) CertPromedioGener.Sections("pagina").Controls("materias13").Caption MSF.TextMatrix(13, 1) CertPromedioGener.Sections("pagina").Controls("materias14").Caption MSF.TextMatrix(14, 1) CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

189

CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS9").Caption MSF.TextMatrix(9, 2) & " MSF3.TextMatrix(9, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS10").Caption MSF.TextMatrix(10, 2) & " MSF3.TextMatrix(10, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS11").Caption MSF.TextMatrix(11, 2) & " MSF3.TextMatrix(11, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS12").Caption MSF.TextMatrix(12, 2) & " MSF3.TextMatrix(12, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS13").Caption MSF.TextMatrix(13, 2) & " MSF3.TextMatrix(13, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS14").Caption MSF.TextMatrix(14, 2) & " MSF3.TextMatrix(14, 2) ElseIf i = 15 Then " & MSF2.TextMatrix(14, 2) & " " & MSF2.TextMatrix(13, 2) & " " & MSF2.TextMatrix(12, 2) & " " & MSF2.TextMatrix(11, 2) & " " & MSF2.TextMatrix(10, 2) & " " & MSF2.TextMatrix(9, 2) & " " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & " " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

190

CertPromedioGener.Sections("pagina").Controls("materias1").Caption MSF.TextMatrix(1, 1) CertPromedioGener.Sections("pagina").Controls("materias2").Caption MSF.TextMatrix(2, 1) CertPromedioGener.Sections("pagina").Controls("materias3").Caption MSF.TextMatrix(3, 1) CertPromedioGener.Sections("pagina").Controls("materias4").Caption MSF.TextMatrix(4, 1) CertPromedioGener.Sections("pagina").Controls("materias5").Caption MSF.TextMatrix(5, 1) CertPromedioGener.Sections("pagina").Controls("materias6").Caption MSF.TextMatrix(6, 1) CertPromedioGener.Sections("pagina").Controls("materias7").Caption MSF.TextMatrix(7, 1) CertPromedioGener.Sections("pagina").Controls("materias8").Caption MSF.TextMatrix(8, 1) CertPromedioGener.Sections("pagina").Controls("materias9").Caption MSF.TextMatrix(9, 1) CertPromedioGener.Sections("pagina").Controls("materias10").Caption MSF.TextMatrix(10, 1) CertPromedioGener.Sections("pagina").Controls("materias11").Caption MSF.TextMatrix(11, 1) CertPromedioGener.Sections("pagina").Controls("materias12").Caption MSF.TextMatrix(12, 1) CertPromedioGener.Sections("pagina").Controls("materias13").Caption MSF.TextMatrix(13, 1) CertPromedioGener.Sections("pagina").Controls("materias14").Caption MSF.TextMatrix(14, 1) CertPromedioGener.Sections("pagina").Controls("materias15").Caption MSF.TextMatrix(15, 1)

191

CertPromedioGener.Sections("pagina").Controls("NOTAS1").Caption MSF.TextMatrix(1, 2) & " MSF3.TextMatrix(1, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS2").Caption MSF.TextMatrix(2, 2) & " MSF3.TextMatrix(2, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS3").Caption MSF.TextMatrix(3, 2) & " MSF3.TextMatrix(3, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS4").Caption MSF.TextMatrix(4, 2) & " MSF3.TextMatrix(4, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS5").Caption MSF.TextMatrix(5, 2) & " MSF3.TextMatrix(5, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS6").Caption MSF.TextMatrix(6, 2) & " MSF3.TextMatrix(6, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS7").Caption MSF.TextMatrix(7, 2) & " MSF3.TextMatrix(7, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS8").Caption MSF.TextMatrix(8, 2) & " MSF3.TextMatrix(8, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS9").Caption MSF.TextMatrix(9, 2) & " MSF3.TextMatrix(9, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS10").Caption MSF.TextMatrix(10, 2) & " MSF3.TextMatrix(10, 2) " & MSF2.TextMatrix(10, 2) & " " & MSF2.TextMatrix(9, 2) & " " & MSF2.TextMatrix(8, 2) & " " & MSF2.TextMatrix(7, 2) & " " & MSF2.TextMatrix(6, 2) & " " & MSF2.TextMatrix(5, 2) & " " & MSF2.TextMatrix(4, 2) & " " & MSF2.TextMatrix(3, 2) & " " & MSF2.TextMatrix(2, 2) & " " & MSF2.TextMatrix(1, 2) & "

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

= "&

192

CertPromedioGener.Sections("pagina").Controls("NOTAS11").Caption MSF.TextMatrix(11, 2) & " MSF3.TextMatrix(11, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS12").Caption MSF.TextMatrix(12, 2) & " MSF3.TextMatrix(12, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS13").Caption MSF.TextMatrix(13, 2) & " MSF3.TextMatrix(13, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS14").Caption MSF.TextMatrix(14, 2) & " MSF3.TextMatrix(14, 2) CertPromedioGener.Sections("pagina").Controls("NOTAS15").Caption MSF.TextMatrix(15, 2) & " MSF3.TextMatrix(15, 2) End If CertPromedioGener.Sections("pagina").Controls("TOTALES").Caption SumProm1 & " " & SumProm2 & " " & SumProm3 " & MSF2.TextMatrix(15, 2) & " " & MSF2.TextMatrix(14, 2) & " " & MSF2.TextMatrix(13, 2) & " " & MSF2.TextMatrix(12, 2) & " " & MSF2.TextMatrix(11, 2) & "

= "&

= "&

= "&

= "&

= "&

CertPromedioGener.Sections("pagina").Controls("TOTAL").Caption TotalProm.Text CertPromedioGener.Sections("Pagina").Controls("Grado").Caption Tabla!curso1 ReportLibreta.Hide CertPromedioGener.Refresh Load CertPromedioGener CertPromedioGener.Show Exit Sub salir: MsgBox "Error, este estudiante no tiene notas de los 3 Trimestre.", vbCritical End Sub

Private Sub boton_Click(Index As Integer)

193

Select Case Index Case 0 Dim f As Long Dim Sum, Sum2 As Double On Error Resume Next 'TRIMESTRE #1 f = 1: Sum = 0: Sum2 = 0 MSF.Rows = 1 Set Tabla = Base.Execute("select NOTAS.TRIMESTRE,MATERIAS.NOMBRE AS MATERIA,NOTAS.PROMEDIO,NOTAS.CONDUCTA from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=1 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " ORDER BY MATERIAS.NOMBRE") Do Until Tabla.EOF MSF.Rows = MSF.Rows + 1 MSF.TextMatrix(f, 0) = Tabla!TRIMESTRE MSF.TextMatrix(f, 1) = Tabla!materia MSF.TextMatrix(f, 2) = Tabla!promedio MSF.TextMatrix(f, 3) = Tabla!CONDUCTA Tabla.MoveNext f=f+1 Loop Tabla.Close Set Tabla = Nothing For i = 1 To f - 1 Sum = Sum + Val(MSF.TextMatrix(i, 2)) Sum2 = Sum2 + Val(MSF.TextMatrix(i, 3)) Next i

194

SumProm1 = Round(Sum / (i - 1)) SumCond1 = Round(Sum2 / (i - 1)) 'TRIMESTRE #2 f = 1: Sum = 0: Sum2 = 0 MSF2.Rows = 1 Set Tabla = Base.Execute("select NOTAS.TRIMESTRE,MATERIAS.NOMBRE AS MATERIA,NOTAS.PROMEDIO,NOTAS.CONDUCTA from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=2 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " ORDER BY MATERIAS.NOMBRE") Do Until Tabla.EOF MSF2.Rows = MSF2.Rows + 1 MSF2.TextMatrix(f, 0) = Tabla!TRIMESTRE MSF2.TextMatrix(f, 1) = Tabla!materia MSF2.TextMatrix(f, 2) = Tabla!promedio MSF2.TextMatrix(f, 3) = Tabla!CONDUCTA Tabla.MoveNext f=f+1 Loop Tabla.Close Set Tabla = Nothing For i = 1 To f - 1 Sum = Sum + Val(MSF2.TextMatrix(i, 2)) Sum2 = Sum2 + Val(MSF2.TextMatrix(i, 3)) Next i SumProm2 = Round(Sum / (i - 1)) SumCond2 = Round(Sum2 / (i - 1)) 'TRIMESTRE #3

195

f = 1: Sum = 0: Sum2 = 0 MSF3.Rows = 1 Set Tabla = Base.Execute("select NOTAS.TRIMESTRE,MATERIAS.NOMBRE AS MATERIA,NOTAS.PROMEDIO,NOTAS.CONDUCTA from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=3 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " ORDER BY MATERIAS.NOMBRE") Do Until Tabla.EOF MSF3.Rows = MSF3.Rows + 1 MSF3.TextMatrix(f, 0) = Tabla!TRIMESTRE MSF3.TextMatrix(f, 1) = Tabla!materia MSF3.TextMatrix(f, 2) = Tabla!promedio MSF3.TextMatrix(f, 3) = Tabla!CONDUCTA Tabla.MoveNext f=f+1 Loop Tabla.Close Set Tabla = Nothing For i = 1 To f - 1 Sum = Sum + Val(MSF3.TextMatrix(i, 2)) Sum2 = Sum2 + Val(MSF3.TextMatrix(i, 3)) Next i SumProm3 = Round(Sum / (i - 1)) SumCond3 = Round(Sum2 / (i - 1)) 'promedios generales TotalProm = Round((Val(SumProm1) + Val(SumProm2) + Val(SumProm3)) / 3) TotalCond = Round((Val(SumCond1) + Val(SumCond2) + Val(SumCond3)) / 3) 'IMPRIME

196

BotonImprime anio.ListIndex = -1 ciclo.ListIndex = -1 alumnos.ListIndex = -1 Case 1 anio.ListIndex = -1 ciclo.ListIndex = -1 alumnos.ListIndex = -1 ReportLibreta.Hide End Select End Sub

Private Sub LlenarCiclo() On Error GoTo salir ciclo.Clear If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If Set Tabla = Base.Execute("Select * from curso order by nombre") While Not Tabla.EOF ciclo.AddItem Tabla!nombre ciclo.ItemData(ciclo.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing anio.Clear Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") While Not Tabla.EOF anio.AddItem Tabla!lectivo

197

Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCiclo Else Unload Me End Sub

Private Sub ciclo_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Private Sub Form_Load() LlenarCiclo anio.ListIndex = ListCount - 1 End Sub

Private Sub LlenarAlumnos() If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If alumnos.Clear Set Tabla = Base.Execute("Select datos.nombre, matriculas.numero from datos inner join matriculas on datos.alumnoid matriculas.Idcurso = " & = matriculas.alumnoid where & " and

ciclo.ItemData(ciclo.ListIndex)

matriculas.lectivo = " & Val(anio.Text)) While Not Tabla.EOF alumnos.AddItem Tabla!nombre

198

alumnos.ItemData(alumnos.NewIndex) = Tabla!numero Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing End Sub

1.24. FORMULARIO CARNET DEL ESTUDIANTE

Dim Tabla As New ADODB.Recordset Dim tablaEd As New ADODB.Recordset

Private Sub anio_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Sub boton() On Error GoTo salir If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If If alumnos.ListIndex = -1 Or ciclo.ListIndex = -1 Or anio.ListIndex = -1 Then Exit Sub Set Tabla = Base.Execute("Select as matriculas.numero, datos.nombre as

Alumno,curso.nombre

curso1,matriculas.folio

from and and

datos,matriculas,curso,notas where datos.alumnoid=matriculas.alumnoid matriculas.idcurso=curso.idanio and matriculas.numero=notas.numero

notas.numero = " & alumnos.ItemData(alumnos.ListIndex) & " and notas.lectivo = " & Val(anio.Text) & " order by datos.nombre") Set CertificadoMatricula.DataSource = Tabla

199

CertificadoMatricula.Sections("Eduardo").Controls("Estudiante").Caption Tabla!alumno CertificadoMatricula.Sections("Eduardo").Controls("Curso").Caption Tabla!curso1

CertificadoMatricula.Sections("Eduardo").Controls("ao").Caption = anio.Text & " - " & Val(anio.Text) + 1 CertificadoMatricula.Sections("Eduardo").Controls("Folio").Caption Tabla!Folio CertificadoMatricula.Sections("Eduardo").Controls("Matricula").Caption = "0" & Tabla!numero CertificadoMatricula.Sections("Eduardo").Controls("Fecha").Caption Format(Date, " dd \de mmmm \del yyyy") RptCertificadoMatricula.Hide CertificadoMatricula.Refresh Load CertificadoMatricula Exit Sub salir: MsgBox "error, consulte al distribuidor del programa.", vbCritical End Sub = =

Private Sub LlenarCiclo() On Error GoTo salir ciclo.Clear If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If Set Tabla = Base.Execute("Select * from curso") While Not Tabla.EOF ciclo.AddItem Tabla!nombre ciclo.ItemData(ciclo.NewIndex) = Tabla!IdAnio Tabla.MoveNext

200

Wend Tabla.Close Set Tabla = Nothing Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") While Not Tabla.EOF anio.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCiclo Else Unload Me End Sub

Private Sub ciclo_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Private Sub Form_Load() LlenarCiclo anio.ListIndex = ListCount - 1 End Sub

Private Sub LlenarAlumnos() If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If

201

alumnos.Clear Set Tabla = Base.Execute("Select datos.nombre, matriculas.numero from datos inner join matriculas on datos.alumnoid matriculas.Idcurso = " & = matriculas.alumnoid where & " and

ciclo.ItemData(ciclo.ListIndex)

matriculas.lectivo = " & Val(anio.Text)) While Not Tabla.EOF alumnos.AddItem Tabla!nombre alumnos.ItemData(alumnos.NewIndex) = Tabla!numero Tabla.MoveNext Wend Tabla.Close: Set Tabla = Nothing End Sub

Private Sub Cancelar_Click() Unload Me End Sub

Private Sub Mostar_Click() On Error GoTo Trata ReporteCarnet.ssQLL = "Select matriculas.numero AS Matricula, datos.nombre AS Alumno, curso.nombre AS Curso, cdate(format(now,'dd/mm/yyyy')) AS Fecha, datos.Padre, datos.Madre, matriculas.representante AS Representante, datos.direapoderado AS Direccion " & _ "FROM Datos, Matriculas,Curso " & _ "WHERE datos.alumnoid=matriculas.alumnoid and

matriculas.idcurso=curso.idanio and matriculas.Lectivo=" & Val(anio.Text) & " and matriculas.IdCurso=" & ciclo.ItemData(ciclo.ListIndex) & "" ReporteCarnet.Show Exit Sub Trata: MsgBox "No hay datos que mostrar.", vbExclamation End Sub

202

1.25. FORMULARIO ACTA DE MATRICULAS

Dim TablaEdu As New ADODB.Recordset

Private Sub LlenarLectivo() If TablaEdu.State = 1 Then TablaEdu.Close Set TablaEdu = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") lectivo.Clear While Not TablaEdu.EOF lectivo.AddItem TablaEdu!lectivo TablaEdu.MoveNext Wend TablaEdu.Close End Sub

Private Sub boton_Click(Index As Integer) Select Case Index Case 0: If lectivo.ListIndex = -1 Then MsgBox "Debe seleccionar el ao lectivo del cual desee mostrar la informacin requerida", vbExclamation: Exit Sub If TablaEdu.State = 1 Then TablaEdu.Close On Error GoTo salir Set TablaEdu = Base.Execute("select datos.sexo,matriculas.numero as

Matricula,curso.nombre as paralelo,datos.nombre as estudiante,datos.lnacimiento & ', ' & datos.fecha as as

LugFechNac,datos.padre,datos.madre,datos.vivecon,matriculas.representante

Nomapoderado,datos.direapoderado,matriculas.observacion,format(matriculas.fec ha,'dd') as dia,format(matriculas.fecha,'mmmm') as

mes,format(matriculas.fecha,'yyyy') as ano from datos, matriculas,curso where datos.alumnoid=matriculas.alumnoid and curso.idanio=matriculas.idcurso and matriculas.lectivo=" & Val(lectivo.Text) & " ")

203

Set RptMatricula.DataSource = TablaEdu If Val(TablaEdu!Sexo) = 1 Then RptMatricula.Sections("seccin1").Controls("etiqueta7").Caption = "Apellidos y Nombres de la Alumna" RptMatricula.Sections("seccin1").Controls("etiqueta12").Caption = "Vive con" Else RptMatricula.Sections("seccin1").Controls("etiqueta7").Caption = "Apellidos y Nombres del Alumno" RptMatricula.Sections("seccin1").Controls("etiqueta12").Caption = "Vive con" End If RptMatricula.Sections("seccin1").Controls("texto2").DataField = "Matricula" RptMatricula.Sections("seccin1").Controls("texto3").DataField = "paralelo" RptMatricula.Sections("seccin1").Controls("texto4").DataField = "Estudiante" RptMatricula.Sections("seccin1").Controls("texto5").DataField = "LugFechNac" RptMatricula.Sections("seccin1").Controls("texto6").DataField = "padre" RptMatricula.Sections("seccin1").Controls("texto7").DataField = "madre" RptMatricula.Sections("seccin1").Controls("texto8").DataField = "vivecon" RptMatricula.Sections("seccin1").Controls("texto9").DataField "nomapoderado" RptMatricula.Sections("seccin1").Controls("texto10").DataField "direapoderado" RptMatricula.Sections("seccin1").Controls("texto12").DataField = "observacion" RptMatricula.Sections("seccin1").Controls("texto13").DataField = "Dia" RptMatricula.Sections("seccin1").Controls("texto14").DataField = "mes" RptMatricula.Sections("seccin1").Controls("texto15").DataField = "ano" RptMatricula.Refresh Unload Me Load RptMatricula RptMatricula.Show Exit Sub salir: MsgBox "Hay un problema, consulte al distribuidor del sistema.", vbCritical = =

204

Case 1: Unload Me End Select End Sub

Private Sub Form_Load() LlenarLectivo End Sub

1.26. FORMULARIO CERTIFICADO DE MATRICULA

Dim Tabla As New ADODB.Recordset Dim tablaEd As New ADODB.Recordset Dim Sexo As String Dim S As String

Private Sub anio_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Sub boton() On Error GoTo salir If Tabla.State = 1 Then Tabla.Close: Set Tabla = Nothing End If If alumnos.ListIndex = -1 Or ciclo.ListIndex = -1 Or anio.ListIndex = -1 Then Exit Sub 'Or Descripcion.ListIndex = -1 Set Tabla = Base.Execute("Select as curso1 matriculas.numero, from datos.nombre as

Alumno,curso.nombre

datos,matriculas,curso

where

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and matriculas.numero = " & alumnos.ItemData(alumnos.ListIndex) & " and matriculas.lectivo = " & Val(anio.Text) & " order by datos.nombre")

205

Set CertificadoMatricula.DataSource = Tabla If Sexo = "1" Then CertificadoMatricula.Sections("Eduardo").Controls("Sexo").Caption = "la" CertificadoMatricula.Sections("Eduardo").Controls("Sexo1").Caption = "a" CertificadoMatricula.Sections("Eduardo").Controls("Sexo2").Caption = "a" Else CertificadoMatricula.Sections("Eduardo").Controls("Sexo").Caption = "el" CertificadoMatricula.Sections("Eduardo").Controls("Sexo1").Caption = "o" CertificadoMatricula.Sections("Eduardo").Controls("Sexo2").Caption = "o" End If CertificadoMatricula.Sections("Eduardo").Controls("Estudiante").Caption Tabla!alumno CertificadoMatricula.Sections("Eduardo").Controls("Curso").Caption Tabla!curso1 CertificadoMatricula.Sections("Eduardo").Controls("ao").Caption = anio.Text & " - " & Val(anio.Text) + 1 CertificadoMatricula.Sections("Eduardo").Controls("Matricula").Caption = "0" & Tabla!numero CertificadoMatricula.Sections("Eduardo").Controls("Fecha").Caption Format(Date, " dd \de mmmm \del yyyy") CertificadoMatricula.Sections("Seccin4").Controls("Especie").Caption = "N. &S RptCertMatricula.Hide CertificadoMatricula.Refresh Load CertificadoMatricula CertificadoMatricula.Show Exit Sub salir: Unload CertificadoMatricula MsgBox "Error, este estudiante no esta matriculado.", vbCritical End Sub " = = =

Private Sub LlenarCiclo()

206

On Error GoTo salir ciclo.Clear If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If Set Tabla = Base.Execute("Select * from curso") While Not Tabla.EOF ciclo.AddItem Tabla!nombre ciclo.ItemData(ciclo.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing anio.Clear Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") While Not Tabla.EOF anio.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCiclo Else Unload Me End Sub

Private Sub ciclo_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos

207

End Sub

Private Sub Descripcion_KeyPress(Tecla As Integer) Select Case Tecla Case Else Tecla = 0 End Select End Sub

Private Sub Form_Load() LlenarCiclo anio.ListIndex = ListCount - 1 Sexo = "" End Sub

Private Sub LlenarAlumnos() If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If alumnos.Clear Set Tabla = Base.Execute("Select datos.nombre, matriculas.numero from datos inner join matriculas on datos.alumnoid matriculas.Idcurso = " & = matriculas.alumnoid where & " and

ciclo.ItemData(ciclo.ListIndex)

matriculas.lectivo = " & Val(anio.Text)) While Not Tabla.EOF alumnos.AddItem Tabla!nombre alumnos.ItemData(alumnos.NewIndex) = Tabla!numero Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing

208

End Sub

Private Sub Cancelar_Click() Unload Me End Sub

Sub Especie() Dim ValorEsp As String Dim i As Integer On Error Resume Next ValorEsp = "1" S = "" Set Tabla = Base.Execute("select max(nespecie) as Especi from Especie where anio='" & anio.Text & "'") ValorEsp = Val(Tabla!especi) + 1 Tabla.Close Set Tabla = Nothing For i = 1 To 5 - Len(ValorEsp) S = S & "0" Next i S = S & ValorEsp Base.Execute "Insert into Especie(Nespecie,anio)values('" & S & "','" & anio.Text & "')" Base.Execute "delete * from especie where anio<='" & Val(anio.Text) - 5 & "'" End Sub

Private Sub Mostar_Click() On Error Resume Next Set Tabla = Base.Execute("Select datos.sexo from datos inner join matriculas on datos.alumnoid = matriculas.alumnoid & "' and where datos.nombre='" = " & &

Trim(alumnos.Text)

matriculas.Idcurso

ciclo.ItemData(ciclo.ListIndex) & " and matriculas.lectivo = " & Val(anio.Text))

209

Sexo = Tabla!Sexo Tabla.Close Set Tabla = Nothing boton End Sub

1.27. FORMULARIO CERTIFICADO DE CONDUCTA

Dim Tabla As New ADODB.Recordset Dim tablaEd As New ADODB.Recordset Dim Sexo, Puntage As String Dim S As String

Private Sub anio_Click() If ciclo.ListIndex = -1 Then Exit Sub LlenarAlumnos End Sub

Sub boton() On Error GoTo salir If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If If alumnos.ListIndex = -1 Or ciclo.ListIndex = -1 Or anio.ListIndex = -1 Then Exit Sub 'Or Descripcion.ListIndex = -1 Set Tabla = Base.Execute("Select *, matriculas.numero, datos.nombre as AlumnoS1,curso.nombre as curso1,matriculas.lectivo from

datos,matriculas,curso,notas where datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and matriculas.numero=notas.numero and

notas.numero = " & alumnos.ItemData(alumnos.ListIndex) & " and notas.lectivo = " & Val(anio.Text) & " order by datos.nombre")

210

Set CertfConducta.DataSource = Tabla CertfConducta.Sections("Pagina").Controls("AnoLectivo").Caption = anio.Text & " - " & Val(anio.Text) + 1 If Sexo = "1" Or Sexo = 1 Then CertfConducta.Sections("Pagina").Controls("Sexo").Caption = "la" CertfConducta.Sections("Pagina").Controls("Sexo1").Caption = "a" Else CertfConducta.Sections("Pagina").Controls("Sexo").Caption = "el" CertfConducta.Sections("Pagina").Controls("Sexo1").Caption = "o" End If CertfConducta.Sections("Pagina").Controls("Estudiante").Caption Tabla!alumnos1 CertfConducta.Sections("Pagina").Controls("Curso").Caption = Tabla!curso1 CertfConducta.Sections("Pagina").Controls("estudiante2").Caption Tabla!alumnos1 CertfConducta.Sections("Pagina").Controls("ao").Caption = anio.Text & " - " & Val(anio.Text) + 1 CertfConducta.Sections("Pagina").Controls("Curso1").Caption = Tabla!curso1 CertfConducta.Sections("Pagina").Controls("Calificacion").Caption TotalCond.Text CertfConducta.Sections("Pagina").Controls("Equivalente").Caption = Puntage CertfConducta.Sections("Pagina").Controls("Fecha").Caption = "Portoviejo, al " & Format(Date, " dd \de mmmm \del yyyy") RptCertificadoConducta.Hide CertfConducta.Refresh Load CertfConducta CertfConducta.Show Exit Sub salir: Unload CertificadoConducta MsgBox "Error, este estudiante no tiene nota de conducta.", vbCritical End Sub = = =

211

Private Sub LlenarCiclo() On Error GoTo salir ciclo.Clear If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If Set Tabla = Base.Execute("Select * from curso") While Not Tabla.EOF ciclo.AddItem Tabla!nombre ciclo.ItemData(ciclo.NewIndex) = Tabla!IdAnio Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing anio.Clear Set Tabla = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") While Not Tabla.EOF anio.AddItem Tabla!lectivo Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarCiclo Else Unload Me End Sub

Private Sub ciclo_Click() If ciclo.ListIndex = -1 Then Exit Sub

212

LlenarAlumnos End Sub

Private Sub Descripcion_KeyPress(Tecla As Integer) Select Case Tecla Case Else Tecla = 0 End Select End Sub

Private Sub Form_Load() LlenarCiclo anio.ListIndex = ListCount - 1 Sexo = "" End Sub

Private Sub LlenarAlumnos() If Tabla.State = 1 Then Tabla.Close Set Tabla = Nothing End If alumnos.Clear Set Tabla = Base.Execute("Select datos.nombre, matriculas.numero from datos inner join matriculas on datos.alumnoid matriculas.Idcurso = " & = matriculas.alumnoid where & " and

ciclo.ItemData(ciclo.ListIndex)

matriculas.lectivo = " & Val(anio.Text)) While Not Tabla.EOF alumnos.AddItem Tabla!nombre alumnos.ItemData(alumnos.NewIndex) = Tabla!numero Tabla.MoveNext Wend Tabla.Close

213

Set Tabla = Nothing End Sub

Private Sub Cancelar_Click() Unload Me End Sub

Sub Especie() Dim ValorEsp As String Dim i As Integer On Error Resume Next ValorEsp = "1" S = "" Set Tabla = Base.Execute("select max(nespecie) as Especi from Especie where anio='" & anio.Text & "'") ValorEsp = Val(Tabla!especi) + 1 Tabla.Close Set Tabla = Nothing For i = 1 To 5 - Len(ValorEsp) S = S & "0" Next i S = S & ValorEsp Base.Execute "Insert into Especie(Nespecie,anio)values('" & S & "','" & anio.Text & "')" Base.Execute "delete * from especie where anio<='" & Val(anio.Text) - 5 & "'" End Sub

Sub LlenarConductas() Dim f As Long Dim Sum, Sum2 As Double On Error Resume Next 'TRIMESTRE #1

214

f = 1: Sum = 0: Sum2 = 0 MSF.Rows = 1 Set Tabla = Base.Execute("select NOTAS.TRIMESTRE,MATERIAS.NOMBRE AS MATERIA,NOTAS.PROMEDIO,NOTAS.CONDUCTA from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=1 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " ORDER BY MATERIAS.NOMBRE") Do Until Tabla.EOF MSF.Rows = MSF.Rows + 1 MSF.TextMatrix(f, 0) = Tabla!TRIMESTRE MSF.TextMatrix(f, 1) = Tabla!materia MSF.TextMatrix(f, 2) = Tabla!promedio MSF.TextMatrix(f, 3) = Tabla!CONDUCTA Tabla.MoveNext f=f+1 Loop Tabla.Close Set Tabla = Nothing For i = 1 To f - 1 Sum = Sum + Val(MSF.TextMatrix(i, 2)) Sum2 = Sum2 + Val(MSF.TextMatrix(i, 3)) Next i SumProm1 = Round(Sum / (i - 1)) SumCond1 = Round(Sum2 / (i - 1)) 'TRIMESTRE #2 f = 1: Sum = 0: Sum2 = 0 MSF2.Rows = 1

215

Set Tabla = Base.Execute("select NOTAS.TRIMESTRE,MATERIAS.NOMBRE AS MATERIA,NOTAS.PROMEDIO,NOTAS.CONDUCTA from where

datos,matriculas,notas,materias,aux,curso

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=2 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " ORDER BY MATERIAS.NOMBRE") Do Until Tabla.EOF MSF2.Rows = MSF2.Rows + 1 MSF2.TextMatrix(f, 0) = Tabla!TRIMESTRE MSF2.TextMatrix(f, 1) = Tabla!materia MSF2.TextMatrix(f, 2) = Tabla!promedio MSF2.TextMatrix(f, 3) = Tabla!CONDUCTA Tabla.MoveNext f=f+1 Loop Tabla.Close Set Tabla = Nothing For i = 1 To f - 1 Sum = Sum + Val(MSF2.TextMatrix(i, 2)) Sum2 = Sum2 + Val(MSF2.TextMatrix(i, 3)) Next i SumProm2 = Round(Sum / (i - 1)) SumCond2 = Round(Sum2 / (i - 1)) 'TRIMESTRE #3 f = 1: Sum = 0: Sum2 = 0 MSF3.Rows = 1 Set Tabla = Base.Execute("select NOTAS.TRIMESTRE,MATERIAS.NOMBRE AS MATERIA,NOTAS.PROMEDIO,NOTAS.CONDUCTA from where

datos,matriculas,notas,materias,aux,curso

216

datos.alumnoid=matriculas.alumnoid and matriculas.idcurso=curso.idanio and curso.idanio=aux.anioid and aux.materiaid=materias.materiaid and

materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and datos.nombre='" & alumnos.Text & "' and notas.trimestre=3 and curso.nombre='" & ciclo.Text & "' and notas.lectivo=" & Val(anio.Text) & " ORDER BY MATERIAS.NOMBRE") Do Until Tabla.EOF MSF3.Rows = MSF3.Rows + 1 MSF3.TextMatrix(f, 0) = Tabla!TRIMESTRE MSF3.TextMatrix(f, 1) = Tabla!materia MSF3.TextMatrix(f, 2) = Tabla!promedio MSF3.TextMatrix(f, 3) = Tabla!CONDUCTA Tabla.MoveNext f=f+1 Loop Tabla.Close Set Tabla = Nothing For i = 1 To f - 1 Sum = Sum + Val(MSF3.TextMatrix(i, 2)) Sum2 = Sum2 + Val(MSF3.TextMatrix(i, 3)) Next i SumProm3 = Round(Sum / (i - 1)) SumCond3 = Round(Sum2 / (i - 1)) TotalProm = Round((Val(SumProm1) + Val(SumProm2) + Val(SumProm3)) / 3) TotalCond = Round((Val(SumCond1) + Val(SumCond2) + Val(SumCond3)) / 3) End Sub

Private Sub Mostar_Click() Dim suma, Valor As String On Error Resume Next suma = 0: Valor = 0 LlenarConductas 'llena las conductas para ser calculadas

217

Puntage = "" Set Tabla = Base.Execute("Select datos.sexo from datos inner join matriculas on datos.alumnoid = matriculas.alumnoid where matriculas.Idcurso = " & ciclo.ItemData(ciclo.ListIndex) & " and matriculas.lectivo = " & Val(anio.Text)) Sexo = Tabla!Sexo Tabla.Close Set Tabla = Nothing If Val(TotalCond) = 0 Or TotalCond = "" Then MsgBox "El estudiante seleccionedo no tiene calificacion general de conducta Trimestral.", vbInformation Exit Sub End If If Val(TotalCond) >= 19 And Val(TotalCond) <= 20 Then Puntage = "Sobresaliente" ElseIf Val(TotalCond) >= 16 And Val(TotalCond) <= 18 Then Puntage = "Muy Bueno" ElseIf Val(TotalCond) >= 13 And Val(TotalCond) <= 15 Then Puntage = "Bueno" ElseIf Val(TotalCond) >= 10 And Val(TotalCond) <= 12 Then Puntage = "Regular" ElseIf Val(TotalCond) >= 0 And Val(TotalCond) <= 9 Then Puntage = "Insuficiente" End If boton End Sub

1.28. FORMULARIO DATOS DEL PROFESOR

Dim Tabla As New ADODB.Recordset Dim TablaEdu As New ADODB.Recordset

Private Sub Cancelar_Click()

218

Unload Me End Sub

Private Sub LlenarProfesores() On Error GoTo salir nombre.Clear Set Tabla = Base.Execute("Select * from Profesores order by nombre") While Not Tabla.EOF nombre.AddItem Tabla!nombre nombre.ItemData(nombre.NewIndex) = Tabla!profesorid Tabla.MoveNext Wend Tabla.Close Set Tabla = Nothing Exit Sub salir: If MsgBox(Err.Description, vbExclamation + vbRetryCancel) = vbRetry Then LlenarProfesores Else Unload Me End Sub

Private Sub Form_Load() LlenarProfesores LlenarLectivo End Sub

Private Sub LlenarLectivo() If TablaEdu.State = 1 Then TablaEdu.Close Set TablaEdu = Base.Execute("Select DISTINCT lectivo from matriculas order by lectivo") lectivo.Clear While Not TablaEdu.EOF lectivo.AddItem TablaEdu!lectivo

219

TablaEdu.MoveNext Wend TablaEdu.Close Set TablaEdu = Nothing End Sub

Private Sub Mostar_Click() If nombre.ListIndex = -1 Then MsgBox "Debe seleccionar el nombre del profesor.", vbExclamation: Exit Sub If lectivo.ListIndex = -1 Then MsgBox "Debe seleccionar el ao lectivo.", vbExclamation: Exit Sub If TablaEdu.State = 1 Then TablaEdu.Close On Error GoTo salir Set TablaEdu = Base.Execute("select profesores.nombre as

Profe,Profesores.direccion,profesores.telefono,Profesores.especialidad,curso.nom bre as anobasica,notas.lectivo,materias.nombre as materias from where curso.idanio=aux.anioid and

matriculas,notas,materias,aux,curso,profesores matriculas.idcurso=curso.idanio and

aux.materiaid=materias.materiaid and materias.materiaid=notas.materiaid and notas.numero=matriculas.numero and profesores.profesorid=aux.profesorid and profesores.nombre='" Val(lectivo.Text) & nombre.Text & & " "' and notas.lectivo=" group & by

profesores.nombre,Profesores.direccion,profesores.telefono,Profesores.especialida d,curso.nombre,notas.lectivo,materias.nombre") Set DatosProfesor.DataSource = TablaEdu DatosProfesor.Sections("seccin2").Controls("Nombre").Caption TablaEdu!profe DatosProfesor.Sections("seccin2").Controls("Direccion").Caption TablaEdu!Direccion DatosProfesor.Sections("seccin2").Controls("Telefono").Caption TablaEdu!Telefono = = =

220

DatosProfesor.Sections("seccin2").Controls("Especialidad").Caption TablaEdu!Especialidad DatosProfesor.Sections("seccin1").Controls("AnoBasica").DataField "anobasica" DatosProfesor.Sections("seccin2").Controls("Lectivo").Caption TablaEdu!lectivo DatosProfesor.Sections("seccin1").Controls("Materias").DataField = "materias" DatosProfesor.Refresh Unload RptProfesor Load DatosProfesor DatosProfesor.Show Exit Sub salir: MsgBox "El profesor no tiene ao de basica en este lectivo.", vbCritical End Sub

221

222

1. EL PROGRAMA PORTETE TARQUI

1.1. DESCRIPCIN DEL PROGRAMA

El sistema Portete Tarqui es un programa de control de informacin ya que tiene como principal caracterstica llevar un control de matrcula y notas de los estudiantes que se encuentran en la escuela Fiscal Mixta Portete de Tarqui.

Est sistema genera las siguientes actividades dentro de est entidad:

Formulario inicio de sesin Formulario de bienvenida al sistema Formulario Principal (MDI) Formularios de Ingreso y modificacin del estudiante Formularios de ingreso y modificacin del matriculas Formularios de ingreso y modificacin de las materias Formularios de ingreso y modificacin clave del sistema Formularios de ingreso y modificacin de datos de la institucin Formularios de ingreso y modificacin de calificaciones Formularios de ingreso y modificacin del profesor Formularios de reportes

223

1.2. REQUERIMIENTOS

Marca Mainboard: Tipo de procesador: Tamao de disco duro: Memoria RAM: Monitor: Unidad de CD: Impresora:

Intel Dual Core de 2.0 GHz o Superior 160 Gb de espacio inicial o Superior 1 GB o Superior VGA o SVGA DVD-Rom Opcional

1.3.INSTALACIN

1. Inserte el CD etiquetado con el nombre de Escuela 2. Seleccione el icono Mi PC, luego abrir la unidad de CD q es D: 3. Abrir la carpeta llamada Instalador Portete Tarqui 4. Hacer doble clic en el icono Setup.exe

1.4.EJECUCIN DEL SISTEMA

1. Escoger el botn Inicio 2. Seleccionar Programas 3. Elegir la opcin Matrcula Escuela 4. Por ultimo clic en Portete de Tarqui

224

2. FUNCIONEMIENTO PORTETE TARQUI

2.1.INTERFAZ DEL SISTEMA

En est momento se pondr en detalle cada una de las interfaces que tiene la aplicacin para su ejecucin.

2.2.INGRESO A LA APLICACIN

Cuando el usuario inicia la aplicacin se muestra la siguiente pantalla la cual da la bienvenida a sistema.

225

2.3.PANTALLA DE INICIO DE SECCIN

Verifica al usuario que tiene acceso al sistema con su respectivo nombre despus que el usuario escriba su contrasea correcta, cumpliendo estas condiciones el usuario tendr que hacer clic en el botn Aceptar para acceder al sistema, el botn Salir sirve para cerrar la aplicacin.

Despus de aceptar la aplicacin anterior aparecer la siguiente interfaz:

226

2.4.PANTALLA PRINCIPAL

Est interfaz es la que posee todas las opciones que el sistema ofrece, entre ellas observamos a los editores de men.

El primer editor se refiere a Datos y est dividido en 7 mens.

El primer men se refiere a Materias y tiene como submen a:

Registrar materia Actualizacin de materias

227

El segundo men se refiere a Profesores y tiene como submen a:

Registrar Profesor Actualizacin de Profesores

El tercer men se refiere a Ao de Educacin Bsica y tiene como submen a:

Registrar Ao Actualizacin de Aos

El cuarto men se refiere a Estudiantes y tiene como submen a:

Registrar Estudiante Actualizacin de Estudiantes

El quinto men se refiere a Matrculas y tiene como submen a:

Registrar Matrcula Actualizacin de Matriculas

El sexto men se refiere a Ingreso de Notas.

El segundo editor se refiere a Ver y tiene como submen a:

228

Barra de herramientas Barra de estado

El tercer editor se refiere a Herramientas y est dividido en 2 mens.

El primer men se refiere a Claves y tiene como submen a:

Crear nueva clave Modificar clave Eliminar clave

El segundo men se refiere a Configuracin.

El cuarto editor es Reporte y est dividido en 10 mens

Mejores estudiantes del periodo Lista de estudiantes por ao bsica Notas del ao bsica por materia Notas del estudiante por trimestre Notas general del estudiante Carnet del estudiante Acta de matrculas Certificado de matrcula Certificado de conducta

229

Datos del profesor.

El cuarto editor tenemos Ayuda que tiene como men acerca de., muestra los datos del sistema operativo en el que se encuentra el sistema instalado.

2.5.INTERFAZ REGISTRAR MATERIA

Est interfaz sirve para ingresar el nombre de la materia asignada a la institucin.

230

Primeramente damos un clic en el botn Nuevo y automticamente se desbloquean los textos listos para ser llenados por el usuario, luego precedemos a dar clic en el botn Guardar para registrarlo al sistema, si el usuario no desea guardar dicha informacin puede hacer uso del botn Salir y cerrar automticamente la interfaz.

2.6.INTERFAZ ACTUALIZACIN DE MATERIAS

Est interfaz sirve para mostrar los datos de las materias que han sido guardados al sistema.

Primeramente precedemos hacer clic en el combo de donde proviene el nombre de la Materia y seleccionamos lo deseado, una vez seleccionado podemos hacer uso del botn Modificar, se desbloquear el texto de donde proviene el nombre de la materia y cambiar por lo deseado dando clic en Guardar, sino quiere puede hacer uso del botn Eliminar sino desea el dato en el sistema. El botn Salir permite cerrar la interfaz.

231

2.7.REGISTRAR PROFESOR

Est interfaz sirve para ingresar un nuevo profesor al sistema.

Primeramente precedemos hacer clic en el botn Nuevo y automticamente se desbloquearan los textos listos para ser ingresado uno a uno los datos del empleado al sistema. Una vez digitado podemos hacer uso del botn Guardar y automticamente se registrar en el sistema.

El botn Salir sirve para cerrar la interfaz actual.

232

2.8. INTERFAZ ACTUALIZACIN DE PROFESORES

Est interfaz sirve para actualizar datos del docente que est actualmente registrado en el sistema.

Para modificar un dato existente o eliminarlo debemos hacer lo siguientes pasos de los cuales tenemos que primeramente seleccionar el nombre del empleado que est en el combo y automticamente lo activa listo para ser modificado o eliminado por el usuario del sistema, si desea modificarlo cambia el dato dando clic en el botn Modificar y despus presion Guardar o por caso contrario presione Salir para cerrar la interfaz actual.

2.9.INTERFAZ REGISTRAR AO

Est interfaz sirve para ingresar el ao junto con los profesores y las materias asignadas al sistema. 233

Primeramente presione el botn Nuevo, luego se desbloquearn los textos y digite el curso, luego haga uso de clic en las materias junto al profesor que va a dar la clase, presione el botn que seala hacia abajo y repita esto hasta que termine de asignar todas las materias que se va a registrar al grado actual y luego presione el botn Guardar o si no desea presione el botn Salir y saldr de la interfaz actual.

2.10. INTERFAZ ACTUALIZACIN DE AO

Est interfaz sirve para buscar datos para ser modificado o eliminados del sistema, tanto como para el ao y las materias asignadas junto al profesor de la clase.

234

Primeramente seleccionamos o buscamos el dato por ao, luego de ver seleccionado se mostrarn los datos del profesor junto a la materia asignada, luego podemos hacer uso de el botn Modificar y automticamente se desbloquearn los textos y estn listo a ser modificado por el usuario, luego de haber modificado el ao puede cambiar al profesor con las materias dando doble clic en el dato o en la materia y saldr un cuadro de dialogo mostrando un mensaje que si desea eliminar el dato y automticamente se eliminar del sistema o si desea cancelar ponga no.

Una vez realizado lo anterior, si desea eliminar el contenido del ao, deber seleccionar el ao y hacer uso del botn Eliminar y automticamente se eliminar los datos del ao junto con los del profesor y materias asignadas de ese lectivo.

235

2.11. INTERFAZ REGISTRAR ESTUDIANTE

Est interfaz sirve para registrar datos nuevos diariamente durante los meses de matrcula del estudiante.

Para registrar un dato primero damos clic en el botn Nuevo, automticamente se desbloquean los textos y estn listos para llenar con los datos del estudiante a matricular, una vez lleno los textos procedemos a guardar la informacin y se bloquearn los textos listos para seguir ingresando ms informacin realizando los pasos anteriormente.

Al momento de llenar los datos del estudiante y no quiere registrarlo al sistema de clic en el botn Salir para cerrar la interfaz actual.

236

2.12. INTERFAZ ACTUALIZACIN DE ESTUDIANTES

Est interfaz sirve para registrar los datos del estudiante que ya a sido registrado anteriormente por el usuario, de aqu procedemos a modificar dicho dato.

Primero de un clic en el botn Buscar seleccionando al estudiante que desea modificar o eliminar.

Una vez que seleccion al estudiante si desea modificar el dato puede preceder a ser clic en el botn Modificar y automticamente se desbloquean los textos y listo para cambiar lo deseado por el usuario del sistema, luego precedemos a ser clic en Guardar para registrarlo al sistema.

Si desea eliminar al estudiante, debe seleccionarlo y luego precedemos a dar clic en el botn Eliminar.

Nota: si el estudiante est actualmente matriculado y con notas no podr eliminarlo del sistema pues tendr que eliminar la matricula y de hay podemos eliminar los datos del estudiante.

237

2.13. INTERFAZ REGISTRAR MATRCULA

Est interfaz sirve para registrar datos del estudiante a matricularse.

Primeramente damos clic en el botn Nuevo y automticamente se desbloquean los textos listos para llenar, una vez lleno los datos procedemos a dar clic en el botn Guardar, en caso contrario presione Salir y saldr de la interfaz actual.

238

2.14. INTERFAZ ACTUALIZACIN DE MATRCULAS

Est interfaz sirve para modificar y eliminar datos de los estudiante que han sido matriculados en el sistema.

Primero procedemos a ser clic en el combo del los nombres de los estudiantes y automticamente se muestran los datos del alumno seleccionado y list a ser modificado o eliminado del sistema.

239

En el momento que los datos estn en pantalla y se desea eliminar alguna materia se deber dar doble clic en la fila en donde se encuentra el dato y saldr un mensaje diciendo que si desea eliminar pues el usuario del sistema deber seleccionar si o no en el caso de no querer borrar. El botn Salir permite cerrar la interfaz actual.

240

2.15. INTERFAZ INGRESO DE NOTAS

Est interfaz sirve para registrar las notas del estudiante.

Si queremos ingresar o modificar notas lo primero que debemos hacer es dar clic en el botn Nuevo, luego seleccionamos el ao bsico, el ao lectivo, el nombre del estudiante, el parcial al que va el estudiante y precedemos hacer clic en el botn que tiene la flecha hacia abajo, se mostrarn celdas en blanco o con datos listo para ingresar las notas y si el estudiante ya tiene notas del parcial anterior se mostrarn todas las que tenga y damos clic en el botn guardar, en caso de no querer registrar las notas presione el botn Salir y automticamente se cerrar la interfaz actual cancelando los datos actuales.

Nota: para cambiar una celda con notas debemos dar clic y presionar el botn del teclado (Suprimir) para borrar y cambiar la nota por otro.

241

2.16. INTERFAZ CREAR NUEVA CLAVE

Est interfaz sirve para crear la clave de entrada al sistema.

Primeramente se hace us del botn Nuevo y automticamente de desbloquean los textos listos a ser digitado por el usuario del sistema, una vez realizado lo anterior deber ser us del botn Guardar y automticamente se registrar en el sistema y cuando cierre el sistema al iniciar de nuevo le pedir digitar la clave junto al nombre del usuario encargado del sistema. Si no desea registrar la clave al sistema haga us del botn Salir y se cerrar la interfaz actual.

242

2.17. INTERFAZ MODIFICAR CLAVE

Est interfaz sirve para modificar la clave del sistema la cual deber estar registrado el usuario del sistema.

Primeramente debemos seleccionar el nombre del usuario, luego deber hacer us del botn Modificar y automticamente se desbloquearn los textos listo a ser remplazado por otra clave, una vez realizado los cambios deber seleccionar el botn Guardar para registrarlo como una clave al sistema o si no desea modificar dicho dato haga us del botn Salir y se cerrar la interfaz actual.

243

2.18. INTERFAZ ELIMINAR CLAVE

Est interfaz sirve para eliminar el nombre del usuario y la contrasea del sistema actual.

Primeramente seleccionamos el nombre del usuario suscrito actualmente en el sistema y digite la clave, luego deber hacer uso del botn Eliminar y automticamente se eliminarn los datos del usuario junto con la clave del sistema, o sino desea eliminar dicho dato haga uso del botn Salir y se cerrar la interfaz actual del sistema.

244

2.19. FORMULARIO MEJORES ESTUDIANTES EN EL PERIODO

Est interfaz sirve para seleccionar a los mejores estudiantes del periodo junto con las notas.

Primeramente deber seleccionar el ao lectivo y hacer us del botn Mostrar para dar con el reporte de los estudiantes en el periodo sealado o sino desea puede hacer us del botn Salir para cerrar el formulario actual.

2.20. INTERFAZ LISTA DE ESTUDIANTES POR AO BSICA

Est interfaz sirve para mostrar el listado general de estudiantes, nicamente del ao de bsica y ao lectivo.

Primeramente seleccionamos el ao bsico y el ao lectivo, luego procedemos a seleccionar el botn Mostrar aparecer el reporte listo para imprimir el contenido y sino desea mostrar los datos deber hacer uso del botn Salir y se cerrar la interfaz actual.

245

2.21. INTERFAZ NOTAS DEL AO BASICO POR MATERIA

Est interfaz sirve para mostrar los nombres de los estudiantes, las notas del ao bsico por trimestre, materia, ao lectivo.

Primeramente seleccionamos los datos anteriormente especificado y procedemos a dar clic en el botn Mostrar luego aparecer el reporte con lo especificado listo a ser impreso por el usuario a cargo, y sino desea mostrar el reporte presione el botn Salir y se cerrar la interfaz actual.

246

2.22. INTERFAZ NOTAS DEL ESTUDIANTE POR TRIMESTRE

Est interfaz sirve para mostrar el ao bsico, ao lectivo, nombre del estudiante y las materias del trimestre.

Primeramente seleccionamos los datos anteriormente especificados, luego procedemos hacer clic en el botn Mostrar y automticamente se mostrarn los datos ya especificados anteriormente, y sino desea mostrar los datos del reporte seleccione el botn Salir para cerrar la interfaz actual.

2.23. INTERFAZ NOTAS GENERAL DEL ESTUDIANTE

Est interfaz sirve para mostrar los datos de notas del estudiante de los tres trimestres con sus respectivas materias y sus promedios generales.

Primeramente seleccionamos el ao de bsica, ao lectivo, el estudiante para luego dar clic en el botn Mostrar y de est manera se mostrar la hoja de

247

reporte, en el caso de no querer mostrar los datos deber dar clic en el botn Salir, para cerrar la interfaz actual.

2.24. INTERFAZ CARNET DEL ESTUDIANTE

Est interfaz sirve para mostrar el carnet de los estudiantes por ao de bsica y ao lectivo.

Primeramente seleccionamos el ao de bsica y ao lectivo para luego dar clic en el botn Mostrar y de est manera se mostrar la hoja de reporte, en el caso de no querer mostrar los datos deber dar clic en el botn Salir, para cerrar la interfaz actual.

248

2.25. INTERFAZ ACTA DE MATRCULAS

Est interfaz sirve para mostrar el reporte de los estudiantes matriculados.

Primeramente seleccionamos el ao lectivo para luego dar clic en el botn Mostrar y de est manera se mostrar la hoja de reporte, en el caso de no querer mostrar los datos deber dar clic en el botn Salir, para cerrar la interfaz actual.

2.26. INTERFAZ CERTIFICADO DE MATRCULA

Est interfaz sirve para mostrar el reporte de los datos del certificado de matrcula del estudiante.

Primeramente seleccionamos el ao bsico, ao lectivo y el nombre del estudiante para luego dar clic en el botn Mostrar y de est manera se mostrar la hoja de reporte, en el caso de no querer mostrar los datos deber dar clic en el botn Salir, para cerrar la interfaz actual.

249

2.27. INTERFAZ CERTIFICADO DE CONDUCTA

Est interfaz sirve para mostrar el reporte de los datos del certificado de conducta del estudiante.

Primeramente seleccionamos el ao bsico, ao lectivo y el nombre del estudiante para luego dar clic en el botn Mostrar y de est manera se mostrar la hoja de reporte, en el caso de no querer mostrar los datos deber dar clic en el botn Salir, para cerrar la interfaz actual.

250

2.28. INTERFAZ CERTIFICADO DE CONDUCTA

Est interfaz sirve para mostrar el reporte de los datos del profesor y sus materias.

Primeramente seleccionamos el nombre del profesor y ao lectivo para luego dar clic en el botn Mostrar y de est manera se mostrar la hoja de reporte, en el caso de no querer mostrar los datos deber dar clic en el botn Cancelar, para cerrar la interfaz actual.

2.29. ACERCA DE..

Este modulo sirve para mostrar los datos del computador, de aqu podemos ver el hardware del computador y otros datos del software apropiados.

251

252

Anda mungkin juga menyukai