BOTON GUARDAR
Publicado por wilmer (14 intervenciones) el 14/02/2014 18:14:48
HOLA CON TODOS, ME PUEDEN AYUDAR CON EL SIGUIENTE PROBLEMA
tengo una tabla llamada pacientes, con un campo llamado idpacientes, el tipo es numerico, con Index Ascending,
el indexes es IDPACIENTE type Primary
EN EL FORMULARIO TENGO UN BOTON GUARDAR, EN EL MISMO TENGO EL SIGUIENTE CODIGO
SELECT pacientes
SET ORDER TO IDPACIENTE && IDPACIENTES
GO bott
**genera una nueva id del paciente cada vez que se ingrese un nuevo paciente
thisform.text1.Value=IDPACIENTE + 1
**abre la tabla
APPEND BLANK
Replace IDPACIENTE WITH thisform.text1.Value
replace cedula WITH thisform.text2.Value
replace Apellidos WITH thisform.text3.Value
replace Nombres WITH thisform.text4.Value
replace Direccion WITH thisform.text5.Value
replace Telefono WITH thisform.text6.Value
replace Estado_civil WITH thisform.text7.Value
replace Fecha_nacimiento WITH thisform.text8.Value
replace Sexo WITH thisform.text9.Value
replace Edad WITH thisform.text10.Value
replace Grupo_sanguineo WITH thisform.text11.Value
replace Celular WITH thisform.text12.Value
replace Ocupacion WITH thisform.text13.Value
MESSAGEBOX("DATOS GUARDADOS", "AVISO")
***limpiar los texbox
thisform.text2.value="" &&cedula
thisform.text3.value="" && nombres
thisform.text4.value="" && apellidos
thisform.text5.value="" && direccion
thisform.text6.value="" && telefono
thisform.text7.value="" && estado civil
thisform.text8.value="" && fecha de nacimiento
thisform.text9.value="" && sexo
thisform.text10.value="" && edad
thisform.text11.value="" && grupo sanguineo
thisform.text12.value="" && celular
thisform.text13.value="" && ocupacion
***************************************************************************************
AHORA EL PROBLEMA ES QUE CUANDO EJECUTO EL CODIGO ME SALE LO SIGIUENTE:
Variable IDPACIENTE is not Found
Uniqueness of index IDPCIENTE is violated
ALGUIEN QUE ME AYUDE REVISANDO MI CODIGO Y EN DONDE ESTOY MAL, DESDE YA MUCHAS GRACIAS
tengo una tabla llamada pacientes, con un campo llamado idpacientes, el tipo es numerico, con Index Ascending,
el indexes es IDPACIENTE type Primary
EN EL FORMULARIO TENGO UN BOTON GUARDAR, EN EL MISMO TENGO EL SIGUIENTE CODIGO
SELECT pacientes
SET ORDER TO IDPACIENTE && IDPACIENTES
GO bott
**genera una nueva id del paciente cada vez que se ingrese un nuevo paciente
thisform.text1.Value=IDPACIENTE + 1
**abre la tabla
APPEND BLANK
Replace IDPACIENTE WITH thisform.text1.Value
replace cedula WITH thisform.text2.Value
replace Apellidos WITH thisform.text3.Value
replace Nombres WITH thisform.text4.Value
replace Direccion WITH thisform.text5.Value
replace Telefono WITH thisform.text6.Value
replace Estado_civil WITH thisform.text7.Value
replace Fecha_nacimiento WITH thisform.text8.Value
replace Sexo WITH thisform.text9.Value
replace Edad WITH thisform.text10.Value
replace Grupo_sanguineo WITH thisform.text11.Value
replace Celular WITH thisform.text12.Value
replace Ocupacion WITH thisform.text13.Value
MESSAGEBOX("DATOS GUARDADOS", "AVISO")
***limpiar los texbox
thisform.text2.value="" &&cedula
thisform.text3.value="" && nombres
thisform.text4.value="" && apellidos
thisform.text5.value="" && direccion
thisform.text6.value="" && telefono
thisform.text7.value="" && estado civil
thisform.text8.value="" && fecha de nacimiento
thisform.text9.value="" && sexo
thisform.text10.value="" && edad
thisform.text11.value="" && grupo sanguineo
thisform.text12.value="" && celular
thisform.text13.value="" && ocupacion
***************************************************************************************
AHORA EL PROBLEMA ES QUE CUANDO EJECUTO EL CODIGO ME SALE LO SIGIUENTE:
Variable IDPACIENTE is not Found
Uniqueness of index IDPCIENTE is violated
ALGUIEN QUE ME AYUDE REVISANDO MI CODIGO Y EN DONDE ESTOY MAL, DESDE YA MUCHAS GRACIAS
Valora esta pregunta
0