Basically I want that when a registry is updated, all the fields are coppied to the rest of the fields that share the same invoice id (FACEXP).
Here is the code:
The problem is that rs.MoveFirst, rs.MoveNext give me an error, do you know why could it be?
Here is the code:
Code:
Private Sub Form_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Form.Recordset
' fields to copy
BANCO = Me![BANCO]
FACEXP = Me![N° FAC EXP]
OPERACION = Me![OPERACION]
FECHALTA = Me![FECHA ALTA]
VTOEMB = Me![VTO EMBARQUE]
VTOP = Me![VTO OPERACION]
rs.MoveFirst
Do Until rs.EOF
If (Nz(Me![N° FAC EXP], 0) = FACEXP) Then
Me![BANCO] = BANCO
Me![N° FAC EXP] = FACEXP
Me![OPERACION] = OPERACION
Me![FECHA ALTA] = FECHALTA
Me![VTO EMBARQUE] = VTOEMB
Me![VTO OPERACION] = VTOP
End If
rs.MoveNext
Loop
End Sub
The problem is that rs.MoveFirst, rs.MoveNext give me an error, do you know why could it be?