(Msg. 1) Posted: Fri Sep 05, 2008 8:12 pm
Post subject: Setting a recordset for a report Archived from groups: microsoft>public>access>reports (more info?)
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.
(Msg. 2) Posted: Sat Sep 06, 2008 5:14 pm
Post subject: Re: Setting a recordset for a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
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.)
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"GracieLou" <GracieLou.RemoveThis@discussions.microsoft.com> wrote in message
news:EA8244A0-4369-491E-9335-F12FB7CA940C@microsoft.com...
>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.
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum