In a form, when pressing a button called "asignar", I want to insert values to an existing table called "movimientos"
Private Sub ASIGNAR_Click()
Dim db As Database
Dim rs As DAO.Recordset
Set rs = db.OpenRecordset("MOVIMIENTOS")
rs.AddNew
rs("ESTATUSDOC").Value = "Blah"
rs("FOLIOFED").Value = "Blah"
rs("NOMBREDOC").Value = "Blah"
rs("PREL").Value = "Blah"
rs("CURP").Value = "Blah"
rs.Update
End Sub
When I press run it keep showing error:
Error 91 object variable or with block variable not set