Unanswered: Inserting data into table based on criteria
I have a table with about 3 fields, - amountpaid, amountreceived and status. When the user clicks on a command button on the form 'Update', I need the system to check the amountpaid and amountreceived fields and if they (the values in the fields)matched, the status should be set to 'Cashed'; if not the status should say 'Not Cashed'. Can anyone help me with the vb code to run behind the button for this to take place. Thanks.
Oh, one more thing, my table has four fields not three.
I also have a date field called "ChequeDate" in the table and once 6 months or more has past, my status needs to change to stale.
I set the default of the Status field to Not Cashed.
Also, I created an update query so that once the user clicks the update command button on the update form, the status changes to Cashed if both fields amountpaid and amount received matches. that works fine.
Can anyone help me with the date issue, so when the user clicks on the update button, if 6 months or more has elapsed (from the cheque date), the status changes to Stale.