Using a record in a macro

A

Allen Blevins

I have a table that gets updated with a project type. So let say it has SC in
the first field first record.

I want to be able to use that to link inside of a Macro so that macro knows
what project type queries to run becuase i have multiple queries for
different projects.

So that 1 table with that 1 record would let the Macro know what project
queries need to be run.

Thanks
 
A

Arvin Meyer MVP

So first you need to understand that tables are for storing data. That is
their proper use and they should really never be used to display that data,
except perhaps for a developer's analysis. Code does not run in tables, it
runs in forms and reports, and to a lesser extent, in queries.

That said, the form can provide the criteria to the query which is the
recordsource of that or another form, and that recordsource is requeried.
Instead of building separate queries for each project, use 1 query (or 1 set
of queries) to provide output based upon criteria supplied by the form. If
the project data output is so completely different that different Select
statements or queries are required, use an If ... Then ... Else construct,
or a Select Case construct in VBA code, or if you must use macros, try using
conditions to achieve your result.
 

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