WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Setting a recordset for a report

 
   Home -> Office other -> Reports RSS
Next:  How to show a date range in a report  
Author Message
GracieLou

External


Since: Jun 08, 2006
Posts: 5



(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.

I believe I have done this before,

Any suggetions?

Thanks to all.
Back to top
Login to vote
Allen Browne

External


Since: Nov 08, 2003
Posts: 9645



(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.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Reports 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET