[Access/VBA] How to convert a RunMacro with a "repeat expression" in a simple function call ? (no mo

L

loran750-google

Hello

i have that code : DoCmd.RunMacro "Boucle liste user 0", ,
"[Forms]![Form liste utilisateur]![Nom] Is Not Null"

I have converted the macro "Boucle liste user 0" to the function
""Boucle_liste_user_0".
How can i convert the RunMacro into a full VBA code ?
-> How can i write it ? I bet this is a loop code, but which loop code
: while expression1 ? Do ... while expression1 ? or else ?

Thank you & Merci à tous !
 
L

loran750-google

hello

i tried that code but i'm getting into an infinite loop :(
my code must be bad ! because before, while it was "full macro", it was
working :(

Posté le: Ven Mar 10, 2006 12:51 Sujet du message:
 
L

Lyle Fairfield

What is the name of the procedure? Are you calling boucle_liste_user_0
recursively (does boucle_liste_user_0 call itself?) ?
What happens to change [Forms]![Form liste utilisateur]![Nom] Is Not
Null from Null to Not Null?
Access Wizards create ill-conceived, clumsy, inefficient and just plain
dumb code (and almost everything else). Perhaps, if you tell us what
you are trying to do, someone will contribute suggestions for an
efficient solution.
 
L

loran750-google

Hello Lyle Fairfield

Something was wrong inside boucle_liste_user_0
the exit condition ("Nom is not Null") couldn't be false. I corrected
that.

Anyway, the problem is resolved, the code (do while ... loop) is
correct, and it was what i was looking for.

Thank you !

ps : u are right. the wizards are so bad.
 

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