hockey8837
Registered User.
- Local time
- Today, 18:19
- Joined
- Sep 16, 2009
- Messages
- 106
I have 2 combo boxes on a form:
[cboARRAdate] & [cboARRAzip]
I want to base [cboARRAzip] off of [cboARRAdate] (user selects a date, and only records with that date's zip codes are available from the cbo)
It seems to be working fine, I can select a date, and I can see that the zip codes change in [cboARRAzip], but I cannot select any of them but the first in the list.
What did I miss? Any suggestions? -detailed coding below.
the Row Source of the [cboARRAdate] is:
[cboARRAdate] has an after update event of:
the row source of [cboARRAzip] is:
[cboARRAdate] & [cboARRAzip]
I want to base [cboARRAzip] off of [cboARRAdate] (user selects a date, and only records with that date's zip codes are available from the cbo)
It seems to be working fine, I can select a date, and I can see that the zip codes change in [cboARRAzip], but I cannot select any of them but the first in the list.
What did I miss? Any suggestions? -detailed coding below.
the Row Source of the [cboARRAdate] is:
Code:
SELECT DISTINCT qryLocationOfTreeWork.TargetPlantingDate FROM qryLocationOfTreeWork GROUP BY qryLocationOfTreeWork.TargetPlantingDate;
[cboARRAdate] has an after update event of:
Code:
Private Sub cboARRAdate_AfterUpdate()
Me.cboARRAzip = Null
Me.cboARRAzip.Requery
Me.cboARRAzip = Me.cboARRAzip.ItemData(0)
End Sub
Private Sub Form_Current()
Me.cboARRAzip.Requery
End Sub
Private Sub Form_Load()
Me.cboARRAdate = Me.cboARRAdate.ItemData(0)
Call cboARRAdate_AfterUpdate
End Sub
the row source of [cboARRAzip] is:
Code:
SELECT DISTINCT qryLocationOfTreeWork.TargetPlantingDate, qryLocationOfTreeWork.LocationZip FROM qryLocationOfTreeWork WHERE (((qryLocationOfTreeWork.TargetPlantingDate)=[Forms]![frmOrderNewTrees]![cboARRAdate])) ORDER BY qryLocationOfTreeWork.LocationZip;