extracting VARIABLE NAME

knowledge76

Registered User.
Local time
Tomorrow, 00:06
Joined
Jan 20, 2005
Messages
165
HI friends,

I wonder whether it is possible to get variable name for a simple code like this
PHP:
i= 1

for i =  1 to 8
 
debug.print i

next i

I can get the values of i but if i have a complicated strcuture aqnd I at specific time i WANT TO KNOW WHICH VARIABLE IS DELERING ME A VALUE HOW CAN I GET THE VARIABLE NAME AND ITS VALUE SIDE BY SIDE.

I know I can write "i is" & i but can I get the name of variable with code...

Thanks
 
HI friends,

I wonder whether it is possible to get variable name for a simple code like this
PHP:
i= 1
 
for i =  1 to 8
 
debug.print i
 
next i

I can get the values of i but if i have a complicated strcuture aqnd I at specific time i WANT TO KNOW WHICH VARIABLE IS DELERING ME A VALUE HOW CAN I GET THE VARIABLE NAME AND ITS VALUE SIDE BY SIDE.

I know I can write "i is" & i but can I get the name of variable with code...

Thanks

Since you already have the VBA Code available, I would have suggested that you simply write "i is" & i. Since you are looking to do more than that, I am curious as to the nature of the requirement.
 
Since you are using debug.print, I assume you are familiar with the Immediate Window in the VBA IDE. If you are unfamiliar with the Locals & Watch windows in the view menu, take the time to browse Access help on how to set them up and use them. One or both may do exactly what you need without adding any VBA at all.
 

Users who are viewing this thread

Back
Top Bottom