D
DS
I have this DLookUp that is looking up a field then changing the value
of a Yes/No field from -1 to 0
But it doesn't seem to be working. it'll delete the record but won't
change the value from -1 to 0 also I'm not sure if it's even finding the
record.
Any help appreciated.
Thanks
DS
Private Sub Command59_Click()
On Error GoTo Err_Command59_Click
If Forms!Payment.PaymentSubform!PaymentType = "Deposit" Then
DLookup "[DepositID]", "Deposits", [DepositID] = " &
Forms!Payment.PaymentSubform![DepositID]"
Applied = 0
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Else
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
Exit_Command59_Click:
Exit Sub
Err_Command59_Click:
MsgBox Err.Description
Resume Exit_Command59_Click
End Sub
of a Yes/No field from -1 to 0
But it doesn't seem to be working. it'll delete the record but won't
change the value from -1 to 0 also I'm not sure if it's even finding the
record.
Any help appreciated.
Thanks
DS
Private Sub Command59_Click()
On Error GoTo Err_Command59_Click
If Forms!Payment.PaymentSubform!PaymentType = "Deposit" Then
DLookup "[DepositID]", "Deposits", [DepositID] = " &
Forms!Payment.PaymentSubform![DepositID]"
Applied = 0
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Else
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
Exit_Command59_Click:
Exit Sub
Err_Command59_Click:
MsgBox Err.Description
Resume Exit_Command59_Click
End Sub