Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Seattle, Washington, USA
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using If...Then...Else statement for setting tab

    I have a tabbed control with two groups of reports. Whenever I open a report located on the second tab, then close the report, the tabbed control defaults to the first tab. I'd like to create an If...Then...Else statement to force the tabbed control to set the focus on the tab that the report was opened & closed.

    Can anyone help?

    Thanks in advance.

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using If...Then...Else statement for setting tab

    Brent:

    Once you choose to open the report, are you closing the form, then re-opening it after the report is closed? If so, you might try simply setting the visble property of the form to False when you open the report, then set the form's visible property back to True when the report is closed; this should maintain the focus on the tab you want.

    Regards,
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Seattle, Washington, USA
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using If...Then...Else statement for setting tab

    Shane,

    Thanks for your suggestion. My friend also pointed out that my logic was flawed -- I can't use If...Then in order to perform this anyway grin.

    Yeah, my form get closed after I open the report and after you suggested the visible property, I realized that that was an alternative method that I could have used.

    After my friend pointed this out, I used Forms!<form name>!<control name>.setfocus command which did the trick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •