Brian,
>If Me.oExport_Detail.Rules.HasBrokenRules Then
> Dim myBrokenRules As New Collection
> Dim IndexBrokenRule As Int32 = 0
> Dim orule as OakLeaf.MM.Main.Business.mmErrorProviderArgs
> Dim strDLN As String = ""
> For IndexBrokenRule = 0 To Me.oExport_Detail.Rules.BrokenRuleCount - 1
> orule = Me.oExport_Detail.Rules.GetErrorProviderRule(IndexBrokenRule)
> strDLN = dsDetail.Tables(0).Rows(orule.Row).Item("DLN")
> strDLN = strDLN.Substring(4)
> myBrokenRules.Add(New ExportBrokenRulesEventArgs(strDLN, orule.ErrorText))
> Next
>endif
Instead of checking Rules.BrokenRuleCount you need to check Rules.ErrorProviderBrokenRuleCount.
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com