Passing SQL string to Subform

G

Guest

Hi there,
I've created a form with 3 cascading controls (2 drop down lists and a multi
select list box, to be selected in that order) which will return results into
a subform on that form. It looks as though creating a SQL string is reqd iat
least because of the mutli select list box but how do I get the subform to
display that SQL string.
Thanks
Frank
 
S

Steve Schapel

Frank,

Do you literally mean for the SQL string to be displayed on the subform?
Or do you mean the SQL to be applied as a query, and the data
returned by the query to be shown on the subform?

If the first, you could have a label on the subform, and then in your
code, after the strSQl is built in your code, something like this...
Me.MySubform!TheLabel.Caption = strSQL

If the second, I guess you are talking about adjusting the subform's
Record Source, something like this...
Me.MySubform.Form.RecordSource = strSQL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top