A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

HELP with updating a field after a report runs!



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2004, 03:31 PM
Jacqueline
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.