?
Solved

MS-Access VB: Can I set RecordSource of a Report without opening it?

Posted on 2003-02-23
1
Medium Priority
?
432 Views
Last Modified: 2008-03-17
Hi all!

Anyone knows if its possible to set RecordSource of a Report in VB without opening it? When you try to do that you get an error:
"report name misspelled or not open yet"

When you set it AFTER the report is open, you get an error:
"Can't set a RecordSource to an open report"

This is almost like this joke, that a painter shows a painting with just some gray smear and calls it "Israelis crossing the red see" - and when someone ask him why nothing is there, he replies that the Israelis already crossed and the Egyptians didn't come yet ...:)

The only way I found around it is opening the report in design mode, changing the RecordSource and closing, quite an ugly way.

Thanks for the help!
Udi
0
Comment
Question by:udik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
xSinbad earned 150 total points
ID: 8004833
The best way to do this would be to base the report record source on a query and then change the query SQL prior to viewing the report.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question