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

View with input parameter

P: 1
Hi there,

First of all, greetings from a newbie with Access.

I have a View (let's call it view1) that asks for a parameter called "Factory?". I have a Report with 2 graphics and a data table that come from 3 different views, but all the views depend from the original view1. When I try to show the Report, it asks for the parameter Factory, but it does it 3 times (2 graphics + 1 data table). The user is getting angry because I don't know how to solve it.

Can I save the Factory to a variable and then have the view get the parameter from the variable? Can I call the view passing a parameter?

Thanks for your time,

Alex.
Mar 12 '07 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi there,

First of all, greetings from a newbie with Access.

I have a View (let's call it view1) that asks for a parameter called "Factory?". I have a Report with 2 graphics and a data table that come from 3 different views, but all the views depend from the original view1. When I try to show the Report, it asks for the parameter Factory, but it does it 3 times (2 graphics + 1 data table). The user is getting angry because I don't know how to solve it.

Can I save the Factory to a variable and then have the view get the parameter from the variable? Can I call the view passing a parameter?

Thanks for your time,

Alex.
Make the record source of the main report the view. Remove the parameter from it and create a form for the user to enter it instead. Now open the report from a command button with the following assuming the parameter is empName and the textbox on the report is txtEmpName.
Expand|Select|Wrap|Line Numbers
  1. Private Sub command0_Click()
  2.    DoCmd.OpenReport, "ReportName", acViewPreview, ,"[empID]=" & Me.txtEmpName
  3. End Sub
  4.  
Mary
Mar 13 '07 #2

Post your reply

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