Sort fields on continous form.

N

navin

Hi,

I have a continous form with 4 fields. Users can sort the fields when
they click on the respective label of the field:

Private Sub LabelAmount_Click()
If Me.OrderBy = "[Amount]" Then
Me.OrderBy = "[Amount] DESC"
Else
Me.OrderBy = "[Amount]"
End If
End Sub

I have another field "Ageing" which is bound by an expression and
displays the ageing of the requests in users job queue, displayed in
continous form. How can I sort this field using the above method since
this Ageing is not stored in the table as a field.

So, what I need to resolve here is that, when user clicks on the label
associated to Ageing, data displayed on the form should sort (Asc,
Desc).

Thank you in advance your help.

Navin
 
A

Al Campagna

navin,
Try this...
In the query behind the continuous form, create an Ageing calculated
field
Ageing : (Your calculation here)
Remove the calculation from the form, and use this bound field instead.
Now that Ageing is a "bound" field, you may be able to sort on it.
Sorry, didn't have time to test, but it won't take but a munute to try
it...
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top