Cindi Simonson wrote:
Thank you. Where exactly do I put that line of code or what do I
associate it with?
Currently, I'm using a separate button and query with
[FORMS]![nameofform]![SELECT] in the criteria to open a report based
on the value selected from a combo box. The combo box contains
column 1=DeptID, column 2 =ProgramID, column 3=CourseID, column
4=CourseTitle.
The above criteria doesn't work unless the correct ID is in the
matching bound column.
You're correct. Then Column(n) syntax does not work from a query. There are
two ways to work around this.
1) I've never used it, but I have read that you can wrap the criteria
expression in the Eval() function and it will work. Instead of...
[FORMS]![nameofform]![SELECT].Column(1)
....try...
Eval([FORMS]![nameofform]![SELECT].Column1))
2) You can create hidden TextBoxes on the form with ControlSource
expressions like...
=[SELECT].Column(1)
=[SELECT].Column(2)
Etc.,
....and then refer to these hidden TextBoxes in your query instead of the
ComboBox.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com