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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get the value of a combo box into a crosstab query?

Status
Not open for further replies.

whodeycp

MIS
Oct 11, 2007
14
0
0
US
I have a form that is using a combo box to select a year that they want to start a report and will take that year and the next four years as well. Well I want to take the value that is selected in the combo box and use it in a crosstab query. I have never really used crosstabs before and it keeps giving me the error "The Jet Database Engine does not recognize '[Forms]![frmReportLookUp]![cboFindReport]' as a valid field name or expression". The cirteria I am putting in the query is >=[Forms]![frmReportLookUp]![cboFindReport] And <=[Forms]![frmReportLookUp]![cboFindReport]+4 to get the additional four years after the value selected. Can anyone help?
 
How are ya whodeycp . . .

. . . and this:
Code:
[blue][[purple][b]FieldName[/b][/purple]] >= "#" & [Forms]![frmReportLookUp]![cboFindReport] & "#" And [[purple][b]FieldName[/b][/purple]] <= "#" & [Forms]![frmReportLookUp]![cboFindReport]+4 & "#"[/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
In a crosstab query you have to defines the parameters:
menu Query -> Parameters

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top