PC Review


Reply
Thread Tools Rate Thread

Cascading Dependant combo boxes

 
 
New Member
Join Date: Apr 2011
Posts: 6
 
      12th May 2011
Hi there,

I have tried so many different options to achieve this and nothing seems to be working, someone please help!

I have a form which is based on a table called 'JobRequests', within this form i want to have a combo box called 'Directorates', and a combo box called 'Department'. I want the user to pick a directorate, which will then filter the department combo box to only show departments within that directorate. The data for these two combo boxes is stored in a tabled call 'AllDepartments', this table has two fields: 'Directorate' (CWB, CEF, C&I, SC, etc), and 'Department' (All the deaprtments within the organisation). So the each department has the relevant directorate next to it.

I have tried putting the follwing into the row source of the DirectorateCombo:
SELECT DISTINCT AllDepartment.Code FROM AllDepartment ORDER BY AllDepartment.Code;

I then entered the follwing code as an AfterUpdate event of the first combo box:
Department.RowSource = "Select AllDepartment.[Department] FROM AllDepartment WHERE AllDepartment.[Directorate] = ' " & cbo.Direct.Value & " ' ORDER BY AllDepartment.[Department];"

I am getting an expected end of statement error. Could anyone help? Am i getting the syntax slightly wrong?

Harriet
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependant lists using Combo Boxes Lynda Microsoft Excel Misc 2 5th Jul 2008 03:46 PM
Cascading Combo Boxes--Problems Populating Boxes jerryb123 Microsoft Access 0 13th Jun 2008 03:11 PM
dependant combo boxes =?Utf-8?B?ZGF2aWRodWxs?= Microsoft Access Forms 4 15th May 2007 03:04 PM
Dependant Combo Boxes BaroldGene Microsoft Access Form Coding 1 15th Aug 2006 02:13 PM
Dependant combo boxes harpscardiff Microsoft Excel Programming 2 10th May 2006 11:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:26 AM.