473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

[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 3100
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_user_0
loop
--------------------------------------------------------------------------------

Mar 10 '06 #2
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.

Mar 10 '06 #3
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.

Mar 10 '06 #4

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

Similar topics

5
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...
5
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...
4
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...
6
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",...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.