It's a webform with 3 tabs and 4 binded tables in a page.
The 1st tab is binded with Employee and Address tables, 2nd tab is binded with Employee and Employment record tables and the last tab is binded with Employee and Qualification tables.
As the Employee table is binded in all tabs, whenever there is any broken rules exist, it would be hard to indicate the invalid field value. So there is a validation function call whenever the tab index changed.
Here is my validation function.
Private Function ValidateAddress() As Boolean
Dim saveResult As mmSaveDataResult
Me.oAddress.TransactionBegin()
saveResult = Me.Save(Me.oAddress)
Select Case saveResult
Case mmSaveDataResult.RulesPassed
Me.oAddress.TransactionRollback()
Return True
Case mmSaveDataResult.RulesBroken
Me.oAddress.ResolveConcurrency()
Me.oAddress.TransactionRollback()
Return False
Case Else
Me.oAddress.TransactionRollback()
Return False
End Select
End Function
The validation functions are working fine. When it is actually saving the record in the Save Button click in the last tab, even the saveResult is RulePassed and commited, but the record is not inserted into the table. Thanks.