If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
HELP with updating a field after a report runs!
I am trying to update the AppFeeReceivedLetter field in
the dbo_Acknowledgement table after a report is run. Basically, it needs to update so the data entry person knows that this report has already been run for certain applicants. (so they do not receive duplicate letters) The query for that report should check the AppFeeReceivedLetter and FeePaid fields...and only give us the records where AppFeeReceivedLetter = No and FeePaid = Yes Also...the field in the table updates but the checkbox on the form isn't seen immediately...you have to go out of that form and re-enter it to see the update...is there a way to update the checkbox and the form immediately??? Thanks! This is what I have so far...but it isn't working properly..... Private Sub Report_Close() Dim db As Database Dim strSQL As String ' Return reference to current database. Set db = CurrentDb ' Create SQL string. strSQL = "UPDATE dbo.Acknowledgement SET AppFeeReceivedLetter = True " _ & "WHERE AppFeeReceivedLetter = False " ' Run action query. db.Execute strSQL ' Return number of records updated. Debug.Print db.RecordsAffected Set db = Nothing End Sub .. |
Thread Tools | |
Display Modes | |
|
|