How can I automatically update T/F Control using Access Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I set the value of a control in a query using a macro.

For example, I've just printed a report based on a query and now I want to
record "Action Complete" control as True.

Any ideas??
 
KKK said:
How can I set the value of a control in a query using a macro.

For example, I've just printed a report based on a query and now I want to
record "Action Complete" control as True.

Any ideas??

The "SetValue" action might work, but it'd have to be on a control on a
Form or a Report, not a Query. If you want to use an Update Query to
set an [Action Complete] field in a table, you could use the "RunSQL"
action.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
KKK,

Controls are an aspect of forms and reports. Queries don't have controls.

You should use an Update Query to set the value of the field for the
record(s) required. If you base the Update Query on the same query that
the report is based on, the SQL view of such a query would look
something like this...
UPDATE YourQuery SET [Action Complete] = -1

If you want to automate this via a macro, you can run the Update via an
OpenQuery action in the macro.
 
Back
Top