Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box tied to subform problem

Status
Not open for further replies.

vanessa03

Technical User
May 13, 2003
110
US
This seems to me to be a simple thing, but alas I can't figure it out. I have a combo box -cboSelYearMo. My query for the combo box is as follows:
SELECT DISTINCT Format([DateforYear],("yyyymm")) AS SelYrMo
FROM tblPPDates;
That seems to be working fine.
My subform works off a query of the same table with a calculated field called PPYrMo: Format([DateforYear],"yyyymm"). This query list all dates in the month and a comment for each day. I want to be able to pick a Year and month and pull all the records for the month into my subform. I thought I could tie the combo box to the subform by putting the Master field as [cboSelYearNo] and the child field as [PPYrMo], but when I select from the combo box nothing appears in the subform. I did do a requery of the subform in the change event of the combo box. Any help would be appreciated. Thanks.
 
It should work. I tested it to be sure. So I am not seeing something.

Is this a typo? Format([DateforYear],("yyyymm"))
Format([DateforYear],"yyyymm")

Is this a typo? I have a combo box cboSelYearMo
Master field as [cboSelYearNo]
 
Yes that was a typo, it should have been cboSelYearMo. Do you think it might have something to do with it being a date field? I am at a loss. Thanks for responding.
 
I got it working. I deleted the combo box and recreated it, so I must have messed up the original one somehow. Thanks for helping.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top