Setting a recordset for a report

  • Thread starter Thread starter GracieLou
  • Start date Start date
G

GracieLou

I am using Access 2003.

I have 4 tables. They all have quartely data using the same fields. I want
to use just one form instead of a separate report for each table.

On a form the user clicks on the quarter they want to see. If they click on
Q1 button, then the report needs to open with the first quarterly data.

I have defined Globally in a Module "Qtr". When the Q1 button is clicked on
the form, I set "Qtr" to "Q1", Q2 button, "Q2", etc.

On the report "On Open" event I have
If Qtr = "Q1" then Me.Recordset = "tblQ1Data"
ElseIf Qtr = "Q2" then Recordset = "tblQ2Data" etc.

I get Runtime error 2593. This feature is not available in an MDB.

I believe I have done this before,

Any suggetions?

Thanks to all.
 
You need to set the RecordSource property, not the RecordSet property.

The real solution will be to normalize your tables. Anytime you have
multiple tables with the same structure, you really need to consider why
they are not one table (with an addtional field to record the difference.)
 
Back
Top