get the record source of the second form from first form

S

Sara Sun

I have 2 forms. I am trying to get the record source of the second form from
the combobox in the first form.

I tried giving the record source in the second form as “[Forms]! [First
Form]![Combobox]. But it didn’t work.
Has anyone tried it? Or anyone knows a way around this problem?

Thanks
Sara
 
J

Jeff Boyce

Sara

A record source is a recordset (this table, that query, ...). How does your
combobox indicate the "source"?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Sara Sun

HI Jeff
the combo box is a list of queries in my database. I made this combo box as
a dialog box in the first form.
based on the query selected in the combobox in first form, the second form
gets the record source and produces the results.

Sara

Jeff Boyce said:
Sara

A record source is a recordset (this table, that query, ...). How does your
combobox indicate the "source"?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sara Sun said:
I have 2 forms. I am trying to get the record source of the second form
from
the combobox in the first form.

I tried giving the record source in the second form as "[Forms]! [First
Form]![Combobox]. But it didn't work.
Has anyone tried it? Or anyone knows a way around this problem?

Thanks
Sara
 
J

Jeff Boyce

How are you "passing" the record source selected? That is, how are you
trying to tell Form2 to use the query selected in Form1?

Regards

Jeff Boyce
Microsoft Office/Access MVP


Sara Sun said:
HI Jeff
the combo box is a list of queries in my database. I made this combo box
as
a dialog box in the first form.
based on the query selected in the combobox in first form, the second form
gets the record source and produces the results.

Sara

Jeff Boyce said:
Sara

A record source is a recordset (this table, that query, ...). How does
your
combobox indicate the "source"?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sara Sun said:
I have 2 forms. I am trying to get the record source of the second form
from
the combobox in the first form.

I tried giving the record source in the second form as "[Forms]! [First
Form]![Combobox]. But it didn't work.
Has anyone tried it? Or anyone knows a way around this problem?

Thanks
Sara
 
Top