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

pass parameter from combo box with multiple columns

Status
Not open for further replies.

JulieS

MIS
Nov 23, 2000
48
CA
I have a combo box that lists titles and dates of events.
There could be duplicate titles but not dates, that's why I've listed them both in one combo box.
I would like to pass both the title and date to my query, however the syntax in the query's criteria field:
[forms]![frm_Name]![cbx_TitleDate].column(1)
is not working. (neither is .column(2))
Bound column = 1.
Wondering if I can even do such a thing?
 
column count starts at 0

--------------------
Procrastinate Now!
 
Yep I know. It still says 'undefined function ... in expression'.
 
Create 2 hidden textbox (eg txtTitle and txtDate)
Before launching your query (or in the AfterUpdate event procedure of cbx_TitleDate):
Me!txtTitle = cbx_TitleDate
Me!txtDate = cbx_TitleDate.Column(1)

The query can now grab the values you want:
[Forms]![frm_Name]![txtTitle] and [Forms]![frm_Name]![txtDate]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top