I currently run a database with a large number of clients who come through a service. To look for a particular person, I have built in a seach function with the following code, that uses a persons unique identifer number (RAISE number). This is unique to the person, not to the period in the service. Some customers are referred more than once, but all entries are stored under thier RAISE number. I would like that once the search is carried out (code for this is below), for it to show the entries with the most recent entry first (using the field called ReferralDate). Is this possible
Private Sub btnSearch_Click()
On Error GoTo Err_btnSearch_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmReferralsDischarges"
stLinkCriteria = "[RAISENumber]=" & Me![txtRAISE]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.close acForm, "frmSearch"
Regards
l3111, Manchester, UK