I am using Access97 and I have a form with a tab control. In vba I am validating fields and if a field is not valid, I want control to go back to that tab (page) but I cannot get it to work.
Where you are using the validation have code that goes back to the tabctl similar to:
If IsLoaded("frmClient") Then
Me.lstClients = forms!frmClient!txtID
Me.TabCtl51.Value = 2
ElseIf IsLoaded("frmSearcher") Then
Me.lstClients = forms!frmSearcher!lstAddress
Me.TabCtl51.Value = 0
Me.cmdOrder.Enabled = True
Me.cmdQuote.Enabled = True
Me.cmdService.Enabled = False
DoCmd.close acForm, "frmSearcher"
Else
Exit Sub
End If
This is from an actual app and sets up the form the way I want it on entry...
Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.