Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to setFocus with out closing the Exe.

Posted on 2004-09-28
2
177 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error handling in asp.net site 5 34
location of a form 2 25
VB.net capture  result of a SQL query in variables 3 20
SSRS 2016 Rendering HTML tables 3 26
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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