You do that with a form reference to a control. See this sample for an example.Sorry I should clarify....
I have the drop-down in my form. I need to report on certain information in that form. So I am creating a query and basing the report off that query. Queries allows you to create parameters so you can pull certain information. When a user opens my report I want them to have an option of what data they'd like to report out. I was hoping that there is a parameter that I can place in the criteria field for that particular item in my query, that will allow users to chose from a list of items, instead of typing their item in the pop-up parameter window when they open the report.
Sorry I should clarify....
I have the drop-down in my form. I need to report on certain information in that form. So I am creating a query and basing the report off that query. Queries allows you to create parameters so you can pull certain information. When a user opens my report I want them to have an option of what data they'd like to report out. I was hoping that there is a parameter that I can place in the criteria field for that particular item in my query, that will allow users to chose from a list of items, instead of typing their item in the pop-up parameter window when they open the report.
You do that with a form reference to a control. See this sample for an example.
I have tried to replicate the form that boblarson had a sample of but I cannot get mine to work. I am using the Select by CompanyName example. I entered in all my information into the code, but when I click the Open button it gives me a popup window stating "Enter Parameter Value". This command button is just suppose to pull up the report based off the dropdown menu selection and it does not do that. What am I doing wrong?
This is the code that I have.
Private Sub cmdOpReportingPeriod_Click()
' this opens the report in preview mode and you select the customer using the single quotes because Me.cboCompanyName
' returns text and text needs to be surrounded by quotes.
DoCmd.OpenReport "rptReporting", acViewPreview, , "[ReportPeriod]='" & Me.cboReportingPeriod & "'"
End Sub
Should I also post the DB?
The ReportPeriod is a text field.
I tried to attach my DB but it is too large. How do I compress it to send?
Oh my, is there anything that I can start to make this DB feature work? I really do appreciate all your help with this! Thanks a ton!
Hi Boblarson...did you have any luck with this DB?Thanks that helps. This is going to take me a bit as you are trying to use Reporting period but the data is not saved by reporting period. You need something to convert this to work. I may have to work on this at home tonight.