VBYesNo based on Combo Box Selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box on a page 1 of a tab control. If a certain item is
selected in the combo box, it will trigger a messagebox(VBYesNo). If the
click is yes, I want the tab control to go from page 1 to page 2. If the
click is no, I want to set the focus on a text box within page 1.

I have tried lots of different things and nothing seems to work...

Thanks in advance for your help.....

Greg
 
Greg said:
I have a combo box on a page 1 of a tab control. If a certain item is
selected in the combo box, it will trigger a messagebox(VBYesNo). If
the click is yes, I want the tab control to go from page 1 to page 2.
If the click is no, I want to set the focus on a text box within page
1.

I have tried lots of different things and nothing seems to work...

It would help if you described some of the things you've tried. In
principle, it could be something like this:

If MsgBox( _
"Go to next page?", _
vbQuestion+vbYesNo, _
"What Now?") _
= vbYes _
Then
Me!MyTabControl = 1 ' switch to second page
Else
Me!MyTextboxOnPage1.SetFocus
End If
 
My apologies,

Thanks for your help

Dirk Goldgar said:
It would help if you described some of the things you've tried. In
principle, it could be something like this:

If MsgBox( _
"Go to next page?", _
vbQuestion+vbYesNo, _
"What Now?") _
= vbYes _
Then
Me!MyTabControl = 1 ' switch to second page
Else
Me!MyTextboxOnPage1.SetFocus
End If


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top