Setting Conditions in Macros in Access 2003

J

Jeff H

I have four macros that I am running from a parent macro. I need to set a
condition for running three of them. I see the repeat conditions, but I don't
see how to set a condition on running them.

1. Update Changed Q2 Data (run if system date >= April 1)
2. Update Changed Q3 Data (run if system date >= July 1)
3. Update Changed Q4 Data (run if system date >= October 1)

Is this possible with a macro? Would it be more efficient done by a module?

Thanks.
 
S

Steve Schapel

Jeff,

If I understand you correctly, the Conditions for the macro actions would be
like this...

Month(Date())>3
Month(Date())>6
Month(Date())>9

--
Steve Schapel, Microsoft Access MVP


Jeff H said:
I have four macros that I am running from a parent macro. I need to set a
condition for running three of them. I see the repeat conditions, but I
don't
see how to set a condition on running them.

1. Update Changed Q2 Data (run if system date >= April 1)
2. Update Changed Q3 Data (run if system date >= July 1)
3. Update Changed Q4 Data (run if system date >= October 1)

Is this possible with a macro? Would it be more efficient done by a
module?



__________ Information from ESET Smart Security, version of virus signature database 4206 (20090701) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
J

Jeff H

Steve,

I understand that part. What I'm not seeing is where to set the condition.
Using the RunMacro action, I only see the options for Repeat Count and Repeat
Expression. I don't see and If...Then condition for running the macro, which
is what I'm looking for. I only want the macro to run if the condition is
true, otherwise skip it.

Thanks.
 
S

Steve Schapel

Jeff,

Ah, ok, I think I understand the problem.

Go to View menu, and select Conditions.

--
Steve Schapel, Microsoft Access MVP


Jeff H said:
Steve,

I understand that part. What I'm not seeing is where to set the condition.
Using the RunMacro action, I only see the options for Repeat Count and
Repeat
Expression. I don't see and If...Then condition for running the macro,
which
is what I'm looking for. I only want the macro to run if the condition is
true, otherwise skip it.



__________ Information from ESET Smart Security, version of virus signature database 4211 (20090702) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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