form in a form?

  • Thread starter Thread starter Dion
  • Start date Start date
D

Dion

I want to have a form in a form, without it being a
subform - I think. My 1st form will have a series of
combo boxes, and create an sql statement based on these
boxes. This much I can do. My 2nd form will display in
datasheet view the results of this query (recordsource=sql
from 1st form, right?). This will allow the user to
easily copy/paste the results into Excel. For this
reason, I need both forms to be visible together.

I tried using subforms, but found this too limiting for
multiple fields. Can I have a form in a form, without it
being a subform?

thanks
Dion
 
If you don't specify the master/child field then you will have a form in a
form.

I don't know what you mean a subform is too limiting.

Kelvin
 
You can do something like that, but only using subform.

Create new form: "SQL_Frm" with default recordsource.
On main form place subform: "MySubFrm" and set
SourceObject = "SQL_Frm".
After, try code below:

'on button click event
'build sql statement (query)
'refresh data:
'MySubFrm.SourceObject = ""
'MySubFrm.SourceObject = "SQL_Frm"
 
Back
Top