Previous Thread

7/5/2006 12:18:01 PM    multiple tiered cascading field question
Hello, i have a form that pulls current open projects from each selected 
 
users by using these three criterias: 
 
- user name 
 
- fiscal year 
 
- quarter 
 
Each of these are combo boxes and are cascading lists, dependant on the 
 
field before it. 
 
What i want to do is: 
 
Have a 4th field titled "projects" be a list box that pulls all projects 
 
that matches the three criterias selected above.  I have some coding for this 
 
already, but keep getting an error that says something along the lines of the 
 
query being too complicated: 
 
SELECT A.ProjectName, A.* 
 
FROM tbl_project AS A 
 
WHERE (((A.OwnerID)=forms!projectStatus!OwnerIDbox)) And 
 
((A.FiscalYearID)=forms!projectStatus!FiscalYearbox) And 
 
((A.QuarterID)=forms!projectStatus!quarterbox); 
 
Can anyone suggest a solution or provide some assistance?  THanks very much.



7/5/2006 3:35:19 PM    Re: multiple tiered cascading field question
Jeff wrote: 
 
The first thing to do is get rid of the ,A.* because you 
 
probably do not want to retrieve all the fields in the table 
 
and you certainly do not want to retrieve two copies of the 
 
ProjectName. 
 
The rest of the query looks ok to me, so post a more precise 
 
copy of any further error messages. 
 
-- 
 
Marsh 
 
MVP [MS Access]

7/5/2006 7:00:02 PM    Re: multiple tiered cascading field question
Yes, the AfterUpdate event of each combo box needs to do two 
 
things.  The first is to clear any old values based on the 
 
combo box's old value.  The second is to Requery the next 
 
combo box. 
 
user name combo box's AfterUpdate event procedure: 
 
Me.cboFiscalYear = Null 
 
Me.cboQuarter = Null 
 
Me.cboProject = Null 
 
Me.cboFiscalYear.Requery 
 
fiscal year combo box's event: 
 
Me.cboQuarter = Null 
 
Me.cboProject = Null 
 
Me.cboQuarter.Requery 
 
quarter combo box: 
 
Me.cboProject = Null 
 
Me.cboProject.Requery 
 
-- 
 
Marsh 
 
MVP [MS Access] 
 
Jeff wrote: