How to change the focus to another control

As a beginner, I'm learning the simple bits - currently learning the math side of things.

I have 3 textboxes and I enter numbers in them. When I move to the button and press, the answer is shown in a message box.

How can I get the focus to move automatically from the button to the next control I realise I have to close the message box first, but after it closes, I'd like the focus to be moved automatically.

Thanks for your help!!

Regards,

Steve




Answer this question

How to change the focus to another control

  • Kosmo007

    When they click on the button...

    Msgbox("Anything")
    Me.Textbox1.Select

    If that isn't what you wanted - Please say



  • David N.4117

    Thanks very much, AliQ!!

    I've just tried it and that code is exactly what I'm looking for. Much appreciated!

    It's simple if you know these words - I tried lots of fancy things like "shift it here", "move it there", "put it over there" etc. It's a matter of practise and perserverance.

    again, thanks!!

    Steve



  • _Michael_

    No Problem really
    Good luck on your project

    AliQ

  • How to change the focus to another control