Reports : changing record source

  • Thread starter Thread starter thriveni
  • Start date Start date
T

thriveni

I use access 2000.
I have a report that has the same layout for 3 different
tables. Can I use the same report for the 3 tables with a
front end form from which I select which report I need.
How do I specify the record source for the report in such
a case ? any help will be appreciated.
 
thriveni said:
I use access 2000.
I have a report that has the same layout for 3 different
tables. Can I use the same report for the 3 tables with a
front end form from which I select which report I need.
How do I specify the record source for the report in such
a case ?

Use an unbound, invisible text box on the form. When a user
selects a report, store its table/query name in the text
box. Then, use the report's Open event to copy the
table/query name from the form's text box to the report's
RecordSource property.

Me.RecordSource = Forms!theform.thetextbox
 
thanks. that works and also what works is directly taking
a value of group option i have chosen on the form and
setting the recordsource based on that value(case
statement) in the report open event.
 
thanks. that works and also what works is directly taking
a value of group option i have chosen on the form and
setting the recordsource based on that value(case
statement) in the report open event.


Sure that works, but do you really want the report to
contain that much knowledge of the combo box's rwo source
table's structure?
--
Marsh
MVP [MS Access]


 
Back
Top