...
'Resort the data based on the last label selected. Get the location
of the hyphen.
'The left side is the field name and the right side is ASC or DESC
Dim hyphen As Integer, sortfld As String
If Not IsNull(.CurrSort) Then
hyphen = InStr(1, .CurrSort, "-")
sortfld = Mid(.CurrSort, 1, hyphen - 1) & " " & Mid(.CurrSort,
hyphen + 1)
sqlstmt = sqlstmt & " ORDER BY " & sortfld
End If
'Finally reset the subform record source
.RecordSource = sqlstmt
'ADD NEW CODE BELOW
'added v5.3.14.2 to handle Access 2007 problem with child/master
fields issue with a continuous subform
Me.CreditCardSalesRegisterDetails.LinkChildFields = ""
Me.CreditCardSalesRegisterDetails.LinkMasterFields = ""
End With
End Sub