Private Sub Кнопка57_Click()
On Error GoTo Кнопка57_Err
Dim rst As New ADODB.Recordset
rst.Open "SELECT Движение.* FROM Движение WHERE (((Движение.КодДкм)=3));", CurrentProject.Connection
If rst.RecordCount <> 0 Then
Do While Not rst.EOF
rst("УчЦена") = DFirst("УчЦена", "запДвижениеИтоги", [rst.КодТвр])
rst.MoveNext
Loop
End If
rst.Close
Set rst = Nothing
Кнопка57_Exit:
Exit Sub
Кнопка57_Err:
MsgBox Err.Description
Resume Кнопка57_Exit
End Sub
|