Ver Mensaje Individual
  #7 (permalink)  
Antiguo 03/02/2005, 08:29
ERICKA2004
 
Fecha de Ingreso: noviembre-2004
Mensajes: 43
Antigüedad: 19 años, 6 meses
Puntos: 0
Exclamación Generar Codigo Automatico

#4 Ayer, 03:08 PM
ERICKA2004 Fecha de Ingreso: Nov 2004
Mensajes: 33

Generar Codigo Automatico

--------------------------------------------------------------------------------

Necesito Obtener Un Text Box Que Me Genere Un Codigo Automatico En El Formulario Donde Guardare Informacion Lo Necesito Para Luego Consultar Dicha Informacion Por El Codigo Automatico Del Textbox Ayuda Please,
El Textbox Es Text15 Y Esta Dentro Del ForMulario Crear Propuesta..

Esto Es Con El Fin De Llever Un Numero De Control Y Consultar Por El Numero De Control O Codigo Automatico...

ME aparece PERO LO NECESITO CON ORDEN NO EMPEZANDO DESDE 1 NO ALEATORIO HASTA 6 DIGITOS PUEDE LLEGAR,, OTRA COSA APEreCE PERO AL DARLE CLIK AL TEXT Y DEBERIA APARECER AUTOMATICAMENTE...

Aqui va el codigo:

Private Sub Text15_Change()
Randomize
Dim Codigo
For i = 1 To 6
Codigo = Codigo & CStr(Int((9 - 1 + 1) * Rnd + 1))
Next i
Text15.Text = Codigo
End Sub
LO DEBO TENER EN UNA base de datos
luego lo leO Y despuès de que lo lEO lo incremtO en uno
y listo

PERO COMO HAGO?