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

K

KKK

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??
 
V

Vincent Johns

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.
 
S

Steve Schapel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top