Link to home
Start Free TrialLog in
Avatar of gracie1972
gracie1972Flag for United States of America

asked on

ORDER BY in Cascading Combo Boxes in Access 2007

Here is my Code for my cascading combo boxes in Access, all I want to do is sort by Project in my second combo box.  Order by is not working.....

----------------------------------------------------------------------------------------------
Private Sub ProjectType_AfterUpdate()

Me.Project.RowSource = " SELECT ProjectID,Project, ProjectTypeID" _
                       & " FROM tblProjects" _
                       & " WHERE ProjectTypeID=" & Me.ProjectType  
End Sub
------------------------------------------------------------------------------------------------
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, if the one combo box feeds another, you can be real slick and move the focus to the second one...

Me.Project.SetFocus
Me.Project.DropDown
Avatar of gracie1972

ASKER

Thank you, both features worked Awesome :-)
Thanks for the grade.  Good luck with your project.  -Jim