Error 3021
    
		    Saludos!
Al generar mi ejecutable y querer guardar informaci贸n me sale este n煤mero de error la linea son estas por favor revisenlas
Private Sub mnuGuardardatos_Click()
If Text1 <> "" Then
Data1.Recordset.Edit
Data1.Recordset.Update
MsgBox "Datos Guardados", vbInformation + vbOKOnly, "Informaci贸n"
Else
MsgBox "No hay Datos que Guardar", vbInformation + vbOKOnly, "Informaci贸n"
If Err.Number = 3021 Then \' esta linea no me la toma en cuenta me sigue saliendo el mismo error
Data1.Recordset.AddNew
Data1.Recordset.Update
End If
End If
End Sub
de antemano muchas gracias!
    Al generar mi ejecutable y querer guardar informaci贸n me sale este n煤mero de error la linea son estas por favor revisenlas
Private Sub mnuGuardardatos_Click()
If Text1 <> "" Then
Data1.Recordset.Edit
Data1.Recordset.Update
MsgBox "Datos Guardados", vbInformation + vbOKOnly, "Informaci贸n"
Else
MsgBox "No hay Datos que Guardar", vbInformation + vbOKOnly, "Informaci贸n"
If Err.Number = 3021 Then \' esta linea no me la toma en cuenta me sigue saliendo el mismo error
Data1.Recordset.AddNew
Data1.Recordset.Update
End If
End If
End Sub
de antemano muchas gracias!
		    No entiendo bien tu problema, pero segun lo entend铆 lo solucionaria asi:
Private Sub mnuGuardardatos_Click()
On local error goto siError
If Text1 <> "" Then
Data1.Recordset.Edit
Data1.Recordset.Update
MsgBox "Datos Guardados", vbInformation + vbOKOnly, "Informaci贸n"
Else
MsgBox "No hay Datos que Guardar", vbInformation + vbOKOnly, "Informaci贸n"
End If
Exit Sub
siError:
If Err.Number = 3021 Then ' esta linea no me la toma en cuenta me sigue saliendo el mismo error
Data1.Recordset.AddNew
Data1.Recordset.Update
Err=0
End If
End Sub
	    
    Private Sub mnuGuardardatos_Click()
On local error goto siError
If Text1 <> "" Then
Data1.Recordset.Edit
Data1.Recordset.Update
MsgBox "Datos Guardados", vbInformation + vbOKOnly, "Informaci贸n"
Else
MsgBox "No hay Datos que Guardar", vbInformation + vbOKOnly, "Informaci贸n"
End If
Exit Sub
siError:
If Err.Number = 3021 Then ' esta linea no me la toma en cuenta me sigue saliendo el mismo error
Data1.Recordset.AddNew
Data1.Recordset.Update
Err=0
End If
End Sub
		    Gracias amigo tras solcuionar ese problema ahora sale el numero de error 3426
Private Sub mnuGuardardatos_Click()
On local error goto siError
If Text1 <> "" Then
Data1.Recordset.Edit
Data1.Recordset.Update
MsgBox "Datos Guardados", vbInformation + vbOKOnly, "Informaci贸n"
Else
MsgBox "No hay Datos que Guardar", vbInformation + vbOKOnly, "Informaci贸n"
End If
Exit Sub
siError:
If Err.Number = 3021 Then
Data1.Recordset.AddNew ' aqui sale el 3426
Data1.Recordset.Update
Err=0
End If
End Sub
 
	    
    Private Sub mnuGuardardatos_Click()
On local error goto siError
If Text1 <> "" Then
Data1.Recordset.Edit
Data1.Recordset.Update
MsgBox "Datos Guardados", vbInformation + vbOKOnly, "Informaci贸n"
Else
MsgBox "No hay Datos que Guardar", vbInformation + vbOKOnly, "Informaci贸n"
End If
Exit Sub
siError:
If Err.Number = 3021 Then
Data1.Recordset.AddNew ' aqui sale el 3426
Data1.Recordset.Update
Err=0
End If
End Sub
