Hallo,
One way to do this is to make all but the first tab invisible. Then put a 'next' button at the bottom (right) of each tab. Only make this button enabled when the data has been completed for that tab. Clicking the Next button makes the next Tab visible.
The 'Next' Button on the last tab could say 'Finish', or whatever.
You need to make sure that the user does not change previous tabs. You can do this by making previous tabs disabled.
If you want to enable users to change previous tabs then you'll have to put more complicated checks, making subsequent tabs invisible if the data on the current tab is changed so that it is no longer valid.
Sounds a bit long winded but it's not too bad (and will give you an HCI to be proud of)
One simple way to do it is to write a function called:
Code:
Function SetTab1ButtonValidity()
dim ysnValidity as boolean
ysnValidity= True
with me
if "" & !Name = "" then ysnValidity=False
if "" & !Address1 = "" then ysnValidity=False
if "" & !Address2 = "" then ysnValidity=False
if isnull(!Month) then
ysnValidity=false
else
if IsNumeric(!Month) then
If !Month<1 or !Month>12 then ysnValidity = false
else
validity = false
endif
endif
!btnTab1Next.Enabled = ysnValidity
end with
end function
In the AfterUpdate Property of each editable control, put:
=SetTab1ButtonValidity()
(You can do this in one go by selecting all the controls)
Each time one of these controls is changed, the function will run and the Next button set up accordingly. Sweet.
You'll need a separate function for each Tab,
- Frink