Hi
A very basic VBA question about IF ... Else ..... End if
What i need to do is do the following
If "a certain condition is fullfilled" then
do this
and this
and this
Else
do that
and that
and that
End if
However when i write this in VBA editor in MS access, I get an error, it seems that the code dose not understand that "do this, and this, and this" should be executed if the condition is fullfilled, the code understands each line as a seperate command and it only executes the first line "do this" if the condition is met and not the other 2 lines "and this, and this" and I get other errors regarding Else and End if "that there is no if command"
how do you solve this so that VBA understands that the lines are "together"
Regards
A very basic VBA question about IF ... Else ..... End if
What i need to do is do the following
If "a certain condition is fullfilled" then
do this
and this
and this
Else
do that
and that
and that
End if
However when i write this in VBA editor in MS access, I get an error, it seems that the code dose not understand that "do this, and this, and this" should be executed if the condition is fullfilled, the code understands each line as a seperate command and it only executes the first line "do this" if the condition is met and not the other 2 lines "and this, and this" and I get other errors regarding Else and End if "that there is no if command"
how do you solve this so that VBA understands that the lines are "together"
Regards