hockey8837
Registered User.
- Local time
- Today, 17:21
- Joined
- Sep 16, 2009
- Messages
- 106
I have been trying to set up two cascading combo boxes.
cboDate feeds---> cboZip
My last step is to put an option in the cboZip (the child cbo) an '(All)' option so users can select all zip codes for that date if they want.
My VBA in the After Update event for cboDate is:
The row source for cboDate is:
The row source for cboZip is:
I've looked at http://support.microsoft.com/kb/210290
http://www.mvps.org/access/forms/frm0043.htm
and I tried adding in UNION SELECT '(All)', null to both the cboZip row source and into the code, and couldn't get it to work.
I've attached a slimmed down version of the DB.
Thanks for any suggestions on how to get '(All)' to appear in cboZip!
cboDate feeds---> cboZip
My last step is to put an option in the cboZip (the child cbo) an '(All)' option so users can select all zip codes for that date if they want.
My VBA in the After Update event for cboDate is:
Code:
Private Sub cbodate_AfterUpdate()
On Error Resume Next
cboZip.RowSource = "Select distinct qryLocationofTreeWork.LocationZip " & _
"FROM qryLocationofTreeWork " & _
"WHERE qryLocationofTreeWork.TargetPlantingDate = '" & cboDate.Value & "' " & _
"ORDER BY qryLocationofTreeWork.LocationZip;"
End Sub
The row source for cboDate is:
Code:
SELECT qryLocationOfTreeWork.TargetPlantingDate FROM qryLocationOfTreeWork GROUP BY qryLocationOfTreeWork.TargetPlantingDate ORDER BY qryLocationOfTreeWork.TargetPlantingDate;
The row source for cboZip is:
Code:
SELECT DISTINCT ztblZip.LocationZip FROM ztblZip;
I've looked at http://support.microsoft.com/kb/210290
http://www.mvps.org/access/forms/frm0043.htm
and I tried adding in UNION SELECT '(All)', null to both the cboZip row source and into the code, and couldn't get it to work.
I've attached a slimmed down version of the DB.
Thanks for any suggestions on how to get '(All)' to appear in cboZip!
