zainizizah
New member
- Local time
- Today, 16:52
- Joined
- Jul 5, 2020
- Messages
- 4
MACRO CAN ONLY BE CALLED 19 TIMES.WHAT THIS? HOW CAN I USE THE MACRO MORE THAN 19 TIMES?
Hi. Welcome to AWF!MACRO CAN ONLY BE CALLED 19 TIMES.WHAT THIS? HOW CAN I USE THE MACRO MORE THAN 19 TIMES?
Sadly I can attest to the fact that all it takes is a simple procedure creating a loop over a recordset and forgetting to typeUsually this happens when you create a spiderweb of Event driven code,
Yep. It's funny you say that.. I just did that earlier today with some code that created email drafts in Outlook. I only expected one and it took me a few seconds seeing multiple ones pop up before I realized what I had doneSadly I can attest to the fact that all it takes is a simple procedure creating a loop over a recordset and forgetting to type
rs.MoveNext
Hi. Welcome to AWF!
Can you show us your macro? Thanks.
Hi. Thanks! But, that's not your macro. That's the error message. To see why you're getting it, we would like to see your actual macro code.
Just as a quick test, I created a macro that calls itself and was able to make it call itself more than 100 times by using the Repeat Count argument.i use the macro as a button to open something like form or query. i make a system for statistic of sports.
Was it a data macro like the one in question? That might make a difference.Just as a quick test, I created a macro that calls itself and was able to make it call itself more than 100 times by using the Repeat Count argument.
Hmm, sorry, I didn't see any reference to a "data" macro. In which post number was it mentioned?Was it a data macro like the one in question? That might make a difference.
Hmm, maybe I read too much into that post, or was influenced by content at the links about the recursive macro call so I guess I'm all wet on that one.i use the macro as a button to open something like form or query. i make a system for statistic of sports.
Hi. Thanks for the clarification. Since a data macro doesn't really need a UI, I am not sure you will get the same error message prompt when using it. I haven't tried yet, so I am not entirely sure about that right now. However, I was able to duplicate the OP's error message using a UI macro.Hmm, maybe I read too much into that post, or was influenced by content at the links about the recursive macro call so I guess I'm all wet on that one.
Just read that a regular macro can call a data macro so I wonder if that could be at play also. It may be a data macro that's being recursive and raising the error?
I think OP needs to post a zipped copy of db so that the various factors can be more easily checked.