I have a table named tbl_REVBal with Yes/No field named PMTRequests.
There is a form named frm_Payments that has one of many textboxes named PmtStatus and a command button named cmd_PMTReq
If the textbox PmtStatus has a credit amount it turns the cmd_PMTReq visible which is used to determine that the Accounting Dept is required to request overdue Payment. If required, the cmd_PMTReq is clicked. That action is to update the tbl_REVBal
I have a command button on frm_Payments and using the following VBA to update the tbl_REVBal
****PLEASE NOTE: tbl_REVBal is part of the database but not the record source for my frm_Payments***
On my form's click event
Dim strSQL As String
strSQL = "Update tbl_REVBal SET
strSQL = "UPDATE tbl_REVBal SET PMTRequests = 0;"
CurrentDb.Execute strSQL, dbFailOnErrors '(This line triggers an error message)
strSQL = "UPDATE tbl_REVBal SET PMTRequests = 1 where PMTStatus = <0;"
CurrentDb.Execute strSQL, dbFailOnErrors '(This line triggers an error message)
Me.Form.Requery
Please I need help with updating tbl_REVBal, field PmtRequests whenever cmd_PMTReq is visible and clicked. Thanks so much in advance.