B
Bryan
I have a form with field labels and then the summary data
below it. Then in a subform i have all the details of the
data. I want to sort the data in the subform using the
labels. On Click the subform data will sort by ascedning
or descending. It works fine if the labels are in the
subform. If the labels are in the main form I cannot get
it to find the OrderBy property. Here is a sample of the
code that works when the labels are placed directly in the
subform.
If SortOrder = "Asc" Or SortField <> "tranvolume" Then
Me.OrderBy = "tranvolume"
SortOrder = "Desc"
ElseIf SortField = "tranvolume" Then
Me.OrderBy = "tranvolume DESC"
SortOrder = "Asc"
End If
SortField = "tranvolume"
When the labels are in the main form, I need a way to call
the subform field tranvolume however I haven't found the
right code. (i.e. something along the lines of Me!
[subformname].OrderBy = tranvolume
Any help would be appreciated.
Bryan
below it. Then in a subform i have all the details of the
data. I want to sort the data in the subform using the
labels. On Click the subform data will sort by ascedning
or descending. It works fine if the labels are in the
subform. If the labels are in the main form I cannot get
it to find the OrderBy property. Here is a sample of the
code that works when the labels are placed directly in the
subform.
If SortOrder = "Asc" Or SortField <> "tranvolume" Then
Me.OrderBy = "tranvolume"
SortOrder = "Desc"
ElseIf SortField = "tranvolume" Then
Me.OrderBy = "tranvolume DESC"
SortOrder = "Asc"
End If
SortField = "tranvolume"
When the labels are in the main form, I need a way to call
the subform field tranvolume however I haven't found the
right code. (i.e. something along the lines of Me!
[subformname].OrderBy = tranvolume
Any help would be appreciated.
Bryan