Solved

it's that possible to open  a report with vba on a form that will also feed the report  record source - in access 2013

Posted on 2013-11-03
2
775 Views
Last Modified: 2013-11-03
hi

is there some way to feed the record source from a report with vba on the form that will open the report and then feed the record source

something like this
DoCmd.OpenReport "TotalIncomeR", acViewPreview
Reports!TotalIncomeR.RecordSource = sqlstr

Open in new window

0
Comment
Question by:bill201
[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
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39620461
Try this:


DoCmd.OpenReport "TotalIncomeR", acViewPreview, OpenArgs := sqlstr

Open in new window


And in the Open Event of the report:

Me.Recordsource = Me.OpenArgs

Open in new window

0
 

Author Closing Comment

by:bill201
ID: 39620505
thanks alot
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

737 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