By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,203 Members | 1,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,203 IT Pros & Developers. It's quick & easy.

Multi User Environment MsAcces Reports

P: 14
Hi,

My Development is in almost final stages, now i am facing problem with the reports.

I am generating MsAccess Reports based on the selected Parameters, while generating Report I am opening reports forms in desgin mode and then i am passing Parameters and Sql String to Record Source This is working ifne for single user, but if multi users generate then i am facing problem.

If i am not opening the report is desgin mode then I cannot pass the query to record source. is there any way where i can pass string to recordsource without opening in desgin mode, Or is there any better method where i can implement,

So please help me out.


Thanks & Regards
Nov 8 '06 #1
Share this Question
Share on Google+
4 Replies


PEB
Expert 100+
P: 1,418
PEB
Usually Visual Basic can do it instaed you..

In OpenForm event procedure you can set the recordsource like this:

Me.recordsource="SQL"

But maybe you are wondering about the possibility to users to open the same report?

In this case use the front end back end method of implementation...

Where your database is placed on the server

and an mde with your reports forms, specific queries and attachements to your database is located on each PC of user... So the database is accessed and no problems with personnalisation of forms and reports..

And less network traffic in fact..
Nov 8 '06 #2

P: 14
wooow Thanks for the solution, one more thing I wanted to ask , is my below porblem will also solve by using mde method.

Addition to my previous message

below is my code which i am using to generate Report

DoCmd.OpenReport "AA3: Daily Dividend Detail by Account", acViewDesign, , , acHidden
Reports![AA3: Daily Dividend Detail by Account].RecordSource = StrDat1
DoCmd.Close acReport, "AA3: Daily Dividend Detail by Account", acSaveYes
DoCmd.OpenReport "AA3: Daily Dividend Detail by Account", acViewPreview

The Problem is when users are generating reports, other users are not able to login in the database, becuase while generating report i am opening in desgin mode, so I have added AcSaveYes in DoCmd.Close acreport , After Passing my recordsource I am closing the report with aacSaveYes and then i am opening in DoCmd.openReport acpreview, and then my other users also getting same result even though their parameters are different. Becuase first user is opened the Report, so second user unable to change the recordsource.

Please let me know is this is not clear.
Nov 8 '06 #3

P: 14
Hi,

My problem is solved, thanks for the quick information,

I just wanted to say you are great.. thanks.... today you have saved my job.............
Nov 8 '06 #4

NeoPa
Expert Mod 15k+
P: 31,767
I guess you've found out already, but the answer is YES.
Opening a Form or Report in design mode and making changes to the design of the object will lock the database.
If you change the SQL (or other changable properties) from the OnOpen event this doesn't cause the saved copy of the object to change so will not lock the db.
Nov 9 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.