Quick syntax help in a combo box

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have a combo box that is defined by the selection in another combo box.
I need to order the data based on a date field.

So, Order by [tblFunds].[dtFundDate] DESC

I can't seem to get the right syntax.
Any help is appreciated.

Here is my current code:

Private Sub cboSelectCampaign_AfterUpdate()
Dim SFundSource As String
SFundSource = "SELECT [tblFunds].[keyFund], [tblFunds].[txtFundName] " & _
"FROM tblFunds " & _
"WHERE [tblFunds].[keyCampaign] = " &
Me.cboSelectCampaign.Value
Me.cboSelectFund.RowSource = SFundSource
Me.cboSelectFund.Requery

End Sub
.



Relevant Pages

  • Re: pesty "Compile Error!"
    ... > '...finds the last ocurrence of the search string ... > If Not Rng Is Nothing Then Application.Goto Rng, ... > Private Sub TextBox101_KeyPress(ByVal KeyAscii As ... > next selection ...
    (microsoft.public.excel.programming)
  • Re: checkbox code needed
    ... your code works fine except if somebody closes the form without making a selection. ... Private Sub UserForm_Terminate ... Dim OutStr As String ... "Tom Hutchins" wrote in message ...
    (microsoft.public.excel.programming)
  • Re: checkbox code needed
    ... your code works fine except if somebody closes the form without making a selection. ... Private Sub UserForm_Terminate ... Dim OutStr As String ...
    (microsoft.public.excel.programming)
  • Re: beginner function question
    ... string values, enclose each of them in apostrophes. ... > Private Sub List0_AfterUpdate ... > 'Retrieve a listing of the selection made by the user in the list box on ... > 'MsgBox Lead 'debugging tool ...
    (microsoft.public.access.modulesdaovba)
  • Re: Quick syntax help in a combo box
    ... "bcap" wrote: ... Private Sub cboSelectCampaign_AfterUpdate ... Dim SFundSource As String ...
    (microsoft.public.access.forms)