jump to perticular line in VBA code

B

billypit786

Hi,
My project is in Ms Access 2002.
I only want to know ,in Access, is there any function like FLAG or
Label or Go To.
I don't know its name properly.
But in C or C++ we use this function to jump at perticular line in
code.

this is just example code is not working.this is just sample to show
what i want?.

Quote:
Originally Posted by
1 x=some string
2 for(i=1,j=1;i<10,j<strlen(X);i++,j++)
3 {
4 if(i=j)
5 go to LabelA
6 else
7 some code
8 }
9 some code
10
..
..
..
20 LabelA:
21 for(k=0;k<10;k++)
22 {
23 print("string match");
24 }


How can I jump to line 5 to line 20?
 
A

Albert D. Kallal

While most, developers frown on using goto in code, you can use:


Gosub MyLocalSub

or

Goto MylablePoint



The label you jump to looks like:


MyLabelPoint:

Note that for even error handing, I now for the most part don't use goto....

And, in most c compliers, it is usually a special option, or compile switch
that you have to set to even allow goto!
 

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