473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Order the results of a combo box filter help needed

I use a combobox to limit the records shown on a form with an event
procedure:
Private Sub Combo2684_AfterUpdate()
If Me![Combo2684] = "<All>" Then
DoCmd.ShowAllRecords
Else
DoCmd.ApplyFilter , "[PI Last Name] =
Forms![Grant3AEmodified]![combo2684]"
End If

End Sub

I'd like those records Sorted (ordered by) a field on the form called
[End Date]

I just can't get it to work - HELP Please

Where do I add the order by ...
[qryGRANTS-AWARDED-AE].[grants - awarded].[END DATE] DESC
Thanks so much in advance
ArthurE

-warning e-mail address altered- arthureNOSPACE@
Nov 13 '05 #1
2 1312
arthur-e wrote:
I use a combobox to limit the records shown on a form with an event
procedure:
Private Sub Combo2684_AfterUpdate()
If Me![Combo2684] = "<All>" Then
DoCmd.ShowAllRecords
Else
DoCmd.ApplyFilter , "[PI Last Name] =
Forms![Grant3AEmodified]![combo2684]"
End If

End Sub

I'd like those records Sorted (ordered by) a field on the form called
[End Date]

I just can't get it to work - HELP Please

Where do I add the order by ...
[qryGRANTS-AWARDED-AE].[grants - awarded].[END DATE] DESC
Thanks so much in advance
ArthurE

-warning e-mail address altered- arthureNOSPACE@


You can use OrderBy/On. Ex:
Me.OrderBy = "[END DATE] DESC"
Me.OrderByOn = True

Check OrderBy in help.
Nov 13 '05 #2
Great, Thanks - I was using Order By
..... Arthur
Salad <oi*@vinegar.com> wrote:
arthur-e wrote:
I use a combobox to limit the records shown on a form with an event
procedure:
Private Sub Combo2684_AfterUpdate()
If Me![Combo2684] = "<All>" Then
DoCmd.ShowAllRecords
Else
DoCmd.ApplyFilter , "[PI Last Name] =
Forms![Grant3AEmodified]![combo2684]"
End If

End Sub

I'd like those records Sorted (ordered by) a field on the form called
[End Date]

I just can't get it to work - HELP Please

Where do I add the order by ...
[qryGRANTS-AWARDED-AE].[grants - awarded].[END DATE] DESC
Thanks so much in advance
ArthurE

-warning e-mail address altered- arthureNOSPACE@


You can use OrderBy/On. Ex:
Me.OrderBy = "[END DATE] DESC"
Me.OrderByOn = True

Check OrderBy in help.

-warning e-mail address altered- arthureNOSPACE@
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Midiman69 | last post by:
Hi I am trying to use a unbound combo box on a menu form to open another Form and filter records according to the combo box selection and failing miserably! I am using the following -...
8
by: salad | last post by:
I was wondering how you handle active/inactive elements in a combo box. Let's say you have a combo box to select an employee. Joe Blow has been selected for many record however Joe has left the...
1
by: bwakefield | last post by:
Hello, I am currently working on a Stock Control database and I am trying to set a filter on the form using a combo box. At present I am using a continuous form with the combo box being placed in...
7
by: Rotsey | last post by:
Hi, I am loading a tab control on a form. The code loads textboxes and comboboxes and checkboxes, normal data entry form that loads a table row of data. I have a combo on the form above the...
8
by: boliches | last post by:
I am using MS Access 2000 and would like the results from a combo box to be filtered as you type a requirement into the combo box. EG. As you type the name "Smith" the results in the combo box will...
4
by: novoselent | last post by:
This seems like it should be an easy thing, but I think I'm missing something simple here...or I'm just going about it all wrong... Using Access 2003 I have a form that lists vehicle service...
2
by: fredloh | last post by:
i have a table with a yes/no field call "Edited". i have a button that runs code to set the "Edited" field of a selected record to "yes". the code also set the rowsource (using SQL Update and Set...
8
by: troy_lee | last post by:
I want to look at the values of six combo boxes. If any of the boxes are not null, I want to change the value of a separate text box. How can I look at all of them at once? Thanks in advance. ...
2
by: franc sutherland | last post by:
Hello, I am using Access 2003. I have a query which shows a list of club meetings sorted by date. This query is displayed in continuous forms, in a subform. I would like to select a month on...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.