Unanswered: Passing specific ComboBox info to a Query
Hi - hope someone can help.
What I'm trying to do is to select service dates within a 53 week year - and the year doesn't always start on the 1st Jan. When I use specific criteria in the ServiceDate field in the query (dd/mm/yyyy), such as:
"Between #28/12/2009# And (#28/12/2009#+371)"
it works fine.
When I use a text box (set to dd/mm/yyyy) and set the criteria to:
"Between Forms!FRM_FormName!TextBox and (Forms!FRM_FormName!TextBox +371)"
it also works fine
I don't want the user to have to remember the exact start date of each year, so I created a tbltablestartdate table; with 3 fields - ID, year and yearstartdate.
On the form I created & bound a combobox to that table, but only display the year. I want to let the user select the year (yyyy) but use the yearstartdate (dd/mm/yyyy) as the criteria in the query. I substituted 'Combobox' for 'TextBox' making sure that the bound column was the right one for yearstartdate, but that doesn't work either.
You can address any column of a combo or list box and get its value with the syntax:
Where Comboabc is the name of the combo and x is an integer so that the first column is Column(0), the second is Column(1), etc.
You can even consider the combo (or list) as an array and use the syntax:
where x is the column (from 0 to ColumnCount - 1) and y is the line (from 0 to LineCount - 1).