Hello and thanks in advance.
I've read through the threads but can't seem to make this work.
I have a form with a combo box (named DateCode) that provides a table
column name and a subform that contains two columns. The subform is
based on a pre-established SQL query (query returns two fields).
I want to use the DateCode selection to add a column to the select
portion of the SQL query, or replace it altogether, with a query that
contains three fields. The new query would then be used as the data
source for the subform and display all three columns.
Subform original SQL Query: "Select BulkUpdate, Disposition from
Details" - returns 2 column result
New SQL Query: "Select BulkUpdate, Disposition, & me.DateCode & from
Details" - returns 3 columns. As an example the me.DateCode equates
to "Date_Expiry" i.e. "Select BulkUpdate, Disposition, Date_Expiry
from Details"
How on earth do I get the subform to change its RecordSource or
SourceObject so that it displays the 3 columns??
Much appreciated.
Dave