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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Before Report Runs I need to Issue an UPDATE 1

Status
Not open for further replies.

jsteff

Technical User
May 22, 2003
109
US
The form works perfectly. When the user clicks the report button on the form, the report works perfectly based on my query.

Now, when the report button is pushed, i need to execute this statement BEFORE the report runs:
UPDATE TASKS set CrossRefPriority="ZAZ"
WHERE TASKS.PRIORITY="GOOD"
(TASKS is the table used by the query)

Here is the code that executes currently when they push the report button:
Dim stDocName As String
stDocName = "zLoad0Priority"
DoCmd.OpenReport stDocName, acPreview

Ideas?

THANKS






 
Take a look at the DoCmd.RunSQL or CurrentDB.Execute method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
GREAT!!... now i have added the new column to the database BUT it does not show up in the Reports / Design / Field List.

When you have a finished report and you modify the DB table, how do you get the new fields to appear in the report module field list????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top