Hi Forum users,
I wanted to create a combo box that allows me to search for posts in a certain table. I followed a great tutorial of below:
http://ms-access-tips.blogspot.jp/20...or-record.html
I tried is and it worked really good. However, there is one thing that I would be very happy if you could help me to understand.
My table contains USER_ID, LastName and FirstName.
The column order that now shows in the combo box is "USER_ID/LastName/FirstName"
In my case, I would like to have the following order to show in the combo list "LastName/FirstName/USER_ID"
The "LastName" should also appear in alphabetical order.
How can I achieve this?
Do I need to make changes in the VBA-code as of below?
On Error GoTo myError
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "USER_ID = " & Me!ctlSearch
Me.Bookmark = rst.Bookmark
leave:
Me!ctlSearch = Null
If Not rst Is Nothing Then Set rst = Nothing
Exit Sub
myError:
MsgBox "Record Not Found"
Resume leave
or do I have to make changes in the property of the combo box? or a combination of both changing the VBA-code and the properties?
If anyone could help me to achieve this, I would be very very happy.
Best Regards,
Beanie