Convidado 20/2/2015, 17:17
Boa tarde,
Experimente os codigos abaixo em cada botao.
Private Sub BotaoNext_Click()
If Me.CurrentRecord < Me.Recordset.RecordCount Then
DoCmd.RunCommand acCmdRecordsGoToNext
If txtbloqueio.Value = -1 Then
Me.DataVenda.Enabled = False
Me.DataVenda.Locked = True
Me.txt_Nome.Enabled = False
Me.txt_Nome.Locked = True
Me.txt_desconto.Enabled = False
Me.txt_desconto.Locked = True
Me.FORM_VENDASUB.Enabled = False
Me.FORM_VENDASUB.Locked = True
Else
Me.DataVenda.Enabled = True
Me.DataVenda.Locked = False
Me.txt_Nome.Enabled = True
Me.txt_Nome.Locked = False
Me.txt_desconto.Enabled = True
Me.txt_desconto.Locked = False
Me.FORM_VENDASUB.Enabled = True
Me.FORM_VENDASUB.Locked = False
End If
End If
End Sub
Private Sub BotaoPreviu_Click()
If Me.CurrentRecord = 1 Then
ElseIf Me.CurrentRecord <= Me.Recordset.RecordCount Then
DoCmd.GoToRecord , , acPrevious
If txtbloqueio.Value = -1 Then
Me.DataVenda.Enabled = False
Me.DataVenda.Locked = True
Me.txt_Nome.Enabled = False
Me.txt_Nome.Locked = True
Me.txt_desconto.Enabled = False
Me.txt_desconto.Locked = True
Me.FORM_VENDASUB.Enabled = False
Me.FORM_VENDASUB.Locked = True
Else
Me.DataVenda.Enabled = True
Me.DataVenda.Locked = False
Me.txt_Nome.Enabled = True
Me.txt_Nome.Locked = False
Me.txt_desconto.Enabled = True
Me.txt_desconto.Locked = False
Me.FORM_VENDASUB.Enabled = True
Me.FORM_VENDASUB.Locked = False
End If
End If
End Sub