How do I use Repeat Expression in a Macro.

  • Thread starter Repeat Expression
  • Start date
R

Repeat Expression

I am getting an error on a simple expression that should stop the Macro from
repeating.
 
T

tina

we can't see your macro, or your expression. if you post the specifics of
both, somebody might be able to help you.
 
I

ItzRick

I changed my name to ItzRick....This is a macro that is in Microsoft Access.
I am using the design functions avilible and am using the Run Macro Action.
The help on this says that :"Repeat Expression An expression that evaluates
to True (–1) or False (0). The macro stops running if the expression
evaluates to False. The expression is evaluated each time the macro runs. "

But it still does not wrk if I use an expression
 
I

ItzRick

Yes it does. I have it looking at a simple queary that eveluates to False
when there are no more records to update. However, the error states that it
can not find the quaery. I tried it with a table as well and got the same
cannot find error.
 
S

Steve Schapel

ItzRick,

Pardon me for butting in here. I would just like to point out that
troubleshooting computer functioning is often something that requires
"attention to detail". In this case, "does not work", and "use an
expression", and "a simple queary", do not allow anyone to know what you
are doing. In fact, "a simple queary that eveluates to False" doesn't
even make sense, since a query does not evaluate to anything...
evaluating to something is not the purpose or function of a query. So,
when Tina requested the specifics of the macro and the specifics of the
expression, I would respectfully suggest you consider doing just that.
The specifics of the macro means what actions does the macro use, what
are the relevant arguments of the various macro actions, and also any
macro Conditions used. The specifics of the expression means copy/paste
the exact syntax of the expression you are using into your reply post,
and if necessary explain the meaning of any parts of the expression to
anyone for whom it may not be obvious. Thanks.
 
I

ItzRick

Unfortunately I do not know who to copy and paste the macro due to the fact
that it is in the MS Access macro and is not writen in SQL or VB. How to I
get to see the programing of the macro? I used the wizard to build it and do
not have any clue how to see the back end so I can be more expressive. Let
me know if you have any tricks that will help on this.

Thanks
 
S

Steve Schapel

ItzRick,

You said "it does not work if I use an expression". I sort of assumed
that you were writing an expression of some sort into the Repeat
Expression argument of your RunMacro action in your macro. If so, you
would go to the design view of the macro that uses the RunMacro action,
then click to put the cursor in the line of the macro designer where the
RunMacro action is entered, and then you can look down towards the
bottom of the window and see the macro arguments. What is written in
there? I mean, your initial post said "I am getting an error on a
simple expression that should stop the Macro from
repeating", so don't you know what the "simple expression" is, or the
error that you are getting?
 
T

tina

i'm trying to figure out how you used a wizard to build a macro. AFAIK,
wizards that create simple automation usually write VBA code, not macros. as
Steve said, we need specific information in order to help you troubleshoot
your problem. general information will only net you general replies, at
best.

hth
 

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