T
-=TheWalkman=-
i have been progrmaing in Vb Access and this script send me an error.
"the recorsert don't allow updates"
what's should i do?
it's is the script
---------------------------------------------
Private Sub button_1_Click()
Dim rs As New ADODB.Recordset
rs.ActiveConnection = CurrentProject.Connection
rs.Open "Select * From example_tabla", CurrentProject.Connection,
adOpenDynamic, adLockOptimistic
If IsNull(box_a) Then
Beep
MsgBox "Falta seleccionar A", vbExclamation, "Formulario de
Prueba"
box_a.SetFocus
ElseIf IsNull(box_b) Then
Beep
MsgBox "Falta seleccionar B", vbExclamation, "Formulario de
Prueba"
box_b.SetFocus
ElseIf IsNull(box_c) Then
Beep
MsgBox "Falta Seleccionar C", vbExclamation, "Formulario de
Prueba"
box_c.SetFocus
Else
With rs
.AddNew
.Fields("exa_a") = box_a
.Fields("exa_b") = box_b
.Fields("exa_c") = box_c
.Update
.Close
End With
End If
End Sub
thks a lot, and sorry for the bad english i'm form chile
"the recorsert don't allow updates"
what's should i do?
it's is the script
---------------------------------------------
Private Sub button_1_Click()
Dim rs As New ADODB.Recordset
rs.ActiveConnection = CurrentProject.Connection
rs.Open "Select * From example_tabla", CurrentProject.Connection,
adOpenDynamic, adLockOptimistic
If IsNull(box_a) Then
Beep
MsgBox "Falta seleccionar A", vbExclamation, "Formulario de
Prueba"
box_a.SetFocus
ElseIf IsNull(box_b) Then
Beep
MsgBox "Falta seleccionar B", vbExclamation, "Formulario de
Prueba"
box_b.SetFocus
ElseIf IsNull(box_c) Then
Beep
MsgBox "Falta Seleccionar C", vbExclamation, "Formulario de
Prueba"
box_c.SetFocus
Else
With rs
.AddNew
.Fields("exa_a") = box_a
.Fields("exa_b") = box_b
.Fields("exa_c") = box_c
.Update
.Close
End With
End If
End Sub
thks a lot, and sorry for the bad english i'm form chile