Multiple If Statements

abbaddon223

Registered User.
Local time
Yesterday, 20:23
Joined
Mar 13, 2010
Messages
162
Hi,

I'm struggling a little with this one if anyone can help please? I'm trying to put multiple IF statements into one proceedure like the below:

Dim Answer As Integer
Answer = MsgBox("Have You Selected The Correct Outcome?", vbCritical + vbYesNo, "Continue Request?")

If Answer = vbYes Then 'Works fine here

'The bit I can't get right

if [Lastoutcome] = "Appt Set" then
Msgbox "Do Some Stuff"

else

msgbox "Do Some Other stuff"
exit sub
end if

If Answer = vbNo Then
msgbox "Do Some Further Other stuff"

Any help massively apprecaited!!
 
You have a mixture of how you have done something, and a little of what works..

Can you tell us in plain English WHAT exactly you are trying to do?
 
abbaddon223, with post count over 100, you still are not enclosing code in Code tags.. If you did you could have found your answer straight away.. Indent is a very good programming etiquette.. Please use it..
Code:
 If MsgBox("Have You Selected The Correct Outcome?", vbCritical + vbYesNo, "Continue Request?") = vbYes Then
  [COLOR=Green]  'The bit I can't get right[/COLOR]
    If Me.Lastoutcome = "Appt Set" Then
        MsgBox "Do Some Stuff"
    Else
        MsgBox "Do Some Other stuff"
        Exit Sub
    End If
Else
    MsgBox "Do Some Further Other stuff"
End If
 

Users who are viewing this thread

Back
Top Bottom