Skip to Content
author's profile photo Former Member
Former Member

Set Focus

Hi All,

Can anybody suggest me how to set focus ?

Means i have taken two Textbox and on first Textbox i done following code for "Not Empty", means if first Textbox is blank it show error "Not Empty". But after that focus goes on second Textbox.

I want if it is blank then shows error message and focus also set there. If i fill any in that then focus goes to second Textbox.

If edittext.Value = "" Then

SBO_Application.SetStatusBarMessage("Not Empty", BoMessageTime.bmt_Short, True)

End If

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 04:54 AM

    Hi Harish,

    Try this,

    If oFirstTextBox.Value = "" Then
           SBO_Application.SetStatusBarMessage("Not Empty", BoMessageTime.bmt_Short, True)
           BubbleEvent = False
    EndIf

    Or u can also do the following

    If oFirstTextBox.Value = "" Then
           SBO_Application.SetStatusBarMessage("Not Empty", BoMessageTime.bmt_Short, True)
           oForm.Items.Item("1st Edit Box ID").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    EndIf

    Harish, In which event are u checking this..??

    Hope this solves it.

    Regards,

    Vasu Natari.

    Edited by: vasu natari on Aug 13, 2008 6:55 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 04:25 AM

    If the first textbox is empty the focus should not be moved to the second text box....Whether this is ur question...?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.