
compile error: user - defined type not defined
Publicado por Jorge Romero (6 intervenciones) el 12/05/2015 21:04:57
Buenas tardes,
Me encuentro haciendo un formulario para mantenimientos en mi empresa pero me sale error de compilacion y es para la funcion de guardar, este es el codigo:
Me encuentro haciendo un formulario para mantenimientos en mi empresa pero me sale error de compilacion y es para la funcion de guardar, este es el codigo:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Private Sub BTN_GU_Click()
Dim doc As Integer
Dim cons As Integer
If IsNull(TXT_COP) Then
MsgBox ("!!! No ha Puesto Ningun dato ¡¡¡")
TXT_COP.SetFocus
Else
Dim rst As ADODB.Recordset
Dim sql As String
sql = "select COPA_ID from Mantenimiento where COPA_ID = '" & ([TXT_COP]) & "'"
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = sql
Set rst = .Execute
If (rst.BOF And rst.EOF) Then
If (TXT_COP = "" Or LST_CLAS = "" Or LST_MOD = "" Or LST_TEC = "" Or TXT_CONT = "") Then
MsgBox ("!!! Le falta Algun Campo por llenar ¡¡¡")
Else
CurrentDb.Execute ("insert into Mantenimiento (COPA_ID,NOM_HOST,ID_CLASE,NUM_SERIE,NOM_CONTAC,LOCALIZACION,ID_MODELO,FABRICANTE,DISCO_DURO,MEMO_RAM,VEL_PROCESS,LNIATA,OBSERVACIONES,ID_TECNICO) values (" & "'" & ([TXT_COP]) & "'" & " ," & "'" & ([TXT_HOST]) & "'" & "," & "'" & ([TXT_SER]) & "'" & "," & "'" & ([LST_CLAS]) & "'" & "," & "'" & ([TXT_CONT]) & "'" & "," & "'" & ([TXT_LOC]) & "'" & "," & "'" & ([LST_MOD]) & "'" & "," & "'" & ([TXT_FAB]) & "'" & "," & "'" & ([TXT_DISC]) & "'" & "," & "'" & ([TXT_MEM]) & "'" & "," & "'" & ([TXT_PRO]) & "'" & "," & "'" & ([TXT_LNIA]) & "'" & "," & "'" & ([TXT_OBS]) & "'" & "," & "'" & ([LST_TEC]) & "'" & ")")
MsgBox ("!!! Registros Guardados con Exito ¡¡¡")
TXT_COP = ""
TXT_HOST = ""
TXT_SER = ""
LST_CLAS = ""
TXT_CONT = ""
TXT_LOC = ""
LST_MOD = ""
TXT_FAB = ""
TXT_DISC = ""
TXT_MEM = ""
TXT_PRO = ""
TXT_LNIA = ""
TXT_OBS = ""
LST_TEC = ""
TXT_COP.SetFocus
End If
Else
txt = rst!COPA_ID
MsgBox ("!!! Este Serial Ya Existe ¡¡¡")
TXT_COP = ""
TXT_HOST = ""
TXT_SER = ""
LST_CLAS = ""
TXT_CONT = ""
TXT_LOC = ""
LST_MOD = ""
TXT_FAB = ""
TXT_DISC = ""
TXT_MEM = ""
TXT_PRO = ""
TXT_LNIA = ""
TXT_OBS = ""
LST_TEC = ""
TXT_COP.SetFocus
End If
End With
End If
End Sub
Valora esta pregunta


0