473,785 Members | 3,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 !

Mar 10 '06 #1
3 3129
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:

--------------------------------------------------------------------------------
Do while (eval("[Forms]![Form liste utilisateur]![Nom] Is Not Null"))
boucle_liste_us er_0
loop
--------------------------------------------------------------------------------

Mar 10 '06 #2
What is the name of the procedure? Are you calling boucle_liste_us er_0
recursively (does boucle_liste_us er_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.

Mar 10 '06 #3
Hello Lyle Fairfield

Something was wrong inside boucle_liste_us er_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.

Mar 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
9541
by: deko | last post by:
After developing an MDB in Access 2003 on WS03, then making it into an MDE and deploying it on a WinXP box with Access 2003 installed, I get this error: Function is not available in expressions in query expression SELECT IIf(IsNull(),"", & Chr(13) & Char(10)) & IIf(IsNull(),"", & Char(13) & Char(10)) & IIf(IsNull(),"", & Char(13) & Char(10)) & IIf(IsNull(),"",] & IIf(IsNull(),"",", ") &
5
2276
by: deko | last post by:
After developing an MDB in Access 2003 on WS03, then making it into an MDE and deploying it on a WinXP box with Access 2003 installed, I get this error: Function is not available in expressions in query expression SELECT IIf(IsNull(),"", & Chr(13) & Char(10)) & IIf(IsNull(),"", & Char(13) & Char(10)) & IIf(IsNull(),"", & Char(13) & Char(10)) & IIf(IsNull(),"",] & IIf(IsNull(),"",", ") &
4
1969
by: Diogo Alves - Software Developer | last post by:
I have the following code line: dsEmps.Tables.Columns.Expression = "MonthlyDeviation%60"; but hits gives an error it says that can't MOD from System.Double to System.Int32 I tried to put the 60 in double and it says it can't do a MOD from System.Double to System.Double.... I need to MOD that value in the expression column... does anybody knows a
6
6490
by: blackdogharry | last post by:
Hi, I am a novice VBA user. My access version is 2007 on Windows XP PC. I need to create a query that will take pre-existing text values of the B_status field (such as "Received_Emailed", "Processed" etc.) and return the numeric value depending on the value of the B_status value. So I would get 2 in the new field if the value of B_status is "Received_Emailed" and so on. I opened Visual Basic Editor and created a function under...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10151
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3647
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.