Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report controlling a field

Status
Not open for further replies.

SpandexBobcat

Technical User
Jul 31, 2003
332
GB
Hi gang,

I have a couple of questions regarding reports.

Firstly, how do I get a switchboard button to print a report

Secondly, I automatically need a yes/no field (paid) on table OVERTIME to change from no to yes when this has been printed.... How do I do that???

Regards,

SB
 
Using the switchboard manager, you can edit a current button or create a new button and choose the option to open a report and select the report to be opened.

In the report On Close event, you can write a sql statement to update the OVERTIME table where EmployeeID is the Primary Key and is a field on the report:

UpdateTxt = "UPDATE OVERTIME SET OVERTIME.paid = -1 WHERE OVERTIME.EmployeeID = " & Me.EmployeeID
DoCmd.RunSQL UpdateTxt

Hope this helps,


TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top