Visual Basic - AYUDA PLEASE CON VISUAL BASIC. 6 EN ACCESS

Life is soft - evento anual de software empresarial
 
Vista:

AYUDA PLEASE CON VISUAL BASIC. 6 EN ACCESS

Publicado por Isaac (12 intervenciones) el 08/04/2003 21:28:10
NECESITO AYUDA SOBRE SI ME AYUDAN PODER MANIPULAR UN FIELD EN ACCESS.. PLEASE..

GRACIAS DE ANTE MANO
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:AYUDA PLEASE CON VISUAL BASIC. 6 EN ACCESS

Publicado por AngelH. (44 intervenciones) el 08/04/2003 21:31:00
Hola Isaac, Me gustaria que fueras mas explicito, ya hiciste la conexion a la Base de Datos?,Que tipo de coneccion usas?, Que realmente quieres hacer?
Con mucho gusto te ayudamos amigo..
Esperamos...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA PLEASE CON VISUAL BASIC. 6 EN ACCESS

Publicado por Isaac (12 intervenciones) el 08/04/2003 21:39:00
Hola la verdad les agradesco la ayuda...y si que la necesito...
en access necesito saber como puedo manipular una Table para que se incremente el numero de fiel "X" por medio de un comando o formula
ya sea en Visual Basic o de otra manera haciendo algun Click en un Bottom que creare dentro de la base de datos.....

tengo un amigo que me dio esta formula para hacerlo pero no funciona
con Access 2000 solo en Access 97....

'------------------------------------------------------------------------
' FUNCTION: GetPurchNumber
'
' PURPOSE: Retrieves the next Order Number from the Settings table
'------------------------------------------------------------------------
Function GetPurchNumber() As Long
Dim db As Database
Dim t As Table
Dim num As Long

Set db = OpenDatabase("\\Malaka\Service\SK_Table3.mdb")
Set t = db.OpenTable("Settings")

t.MoveFirst
num = t.PurchNumber
t.Edit
t.PurchNumber = t.PurchNumber + 1
t.Update

t.close
GetPurchNumber = num
End Function
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA PLEASE CON VISUAL BASIC. 6 EN ACCESS

Publicado por AngelH (44 intervenciones) el 08/04/2003 22:21:17
Isaac, si quieres que te incremente debes cambiar

t.MoveFirst
por
t.MoveLast

t.MoveFirt busca el primer registro sumara 1 siermpre sera 2
pero t.MoveLast ira al ultimo y sumara 1 suena mas logico.

Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA PLEASE CON VISUAL BASIC. 6 EN ACCESS

Publicado por Isaac (12 intervenciones) el 08/04/2003 23:00:44
Gracias por la ayuda..
pero aqui hay otro problemita que en las lineas :

------------------------------------------------------------------------
' FUNCTION: GetPurchNumber
'
' PURPOSE: Retrieves the next Order Number from the Settings table
'------------------------------------------------------------------------
Function GetPurchNumber() As Long
Dim db As Database
Dim t As Table "ESTA NO ESTA DIFINIDA EN ACCESS 2000"
Dim num As Long

Set db = OpenDatabase("\\Malaka\Service\SK_Table3.mdb")
Set t = db.OpenTable("Settings") " ESTA NO ESTA DIFINIDA EN ACCESS 2000 "

t.MoveFirst
num = t.PurchNumber
t.Edit
t.PurchNumber = t.PurchNumber + 1
t.Update

t.close
GetPurchNumber = num
End Function


NO SE PORQUE SERA....!!
PERO EN ACCESS 97 FUNCIONA BIEN...

DIOS TE BENDIGA
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar