Normally, this is built-in behavior of the PageFrame - clicking on a tab goes to the corresponding page.
Pressumably, your "Edit" button enables de PageFrame, or something similar. Look at the code in the "Edit" button, to figure out what it does; perhaps you have to enable the individual controls instead of the entire PageFrame. You can use SetAll() to do this, or put a Container on each Page (and place the TextBoxes, etc. within the Container).
>Hi all,
>
>I've got a form that uses a frame (form1.mainframe) with five tabs (form1.mainframe.tab1, etc.). Right now, I only allow access to the frame after the user clicks an Edit button on the form. At that point, they can access the frame, make edits, change tabs, etc.
>
>How could I keep things as they are (preventing access to changing the data), but allow them to switch tabs without having to click the Edit button? I want them to be able to view everything on each tab but not be able to change any of the data on the tabs unless they choose Edit.
>
>Thanks,
>
>John
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)