Solved

How to setFocus with out closing the Exe.

Posted on 2004-09-28
2
178 Views
Last Modified: 2010-04-23
I have the code below that I would like it to set focus on a radio button if certain criteria’s are met.  But what keeps happening is when i get to the end command the Exe closes.          

         If Me.RadioButton1.Checked = True Then
                MsgBox("You have selected to send a test to LAStageTIX.  You must select HTML format for that action.")
                Me.RadioButton2.Focus()
                End
            Else
                newMail.Body = emailHeader & emailSubscribe & emailFooter
            End If


Thanks for your help.
0
Comment
Question by:GabicusC
  • 2
2 Comments
 
LVL 14

Expert Comment

by:ptakja
ID: 12174907
The problem is the "End" statement after your focus call.

         If Me.RadioButton1.Checked = True Then
                MsgBox("You have selected to send a test to LAStageTIX.  You must select HTML format for that action.")
                Me.RadioButton2.Focus()
                End  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
            Else
                newMail.Body = emailHeader & emailSubscribe & emailFooter
            End If

Change it to this and you should be good to go.

         If Me.RadioButton1.Checked = True Then
                MsgBox("You have selected to send a test to LAStageTIX.  You must select HTML format for that action.")
                Me.RadioButton2.Focus()
            Else
                newMail.Body = emailHeader & emailSubscribe & emailFooter
            End If
0
 
LVL 14

Accepted Solution

by:
ptakja earned 350 total points
ID: 12174910
The "End" statement kills the app!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question