How can I key in a data field used to launch a query and display the query rsults in the report?
How can I key in a data field used to launch a query and display the query rsults in the report?
what do you mean by 'key in a data field' ? Like a criteria search?
If so, what criteria?
My objective is to manually key in a badge number in the report that will be used as criteria in the query then the query results will be displayed in the report. I have used this by entering the badge number in a form then calling the query and the report. Can I do this all in the form?
I usually open or export reports from forms.
When I launch the reprt from the form The report immediately prints. I have a button on the report to print or exit if hard copy is not desired. I do not even get the usual Access print option screen.
Controls used to enter search criteria must be UNBOUND. Reference the control as filter criteria when opening report. Specify report mode in the OpenReport method.
DoCmd.OpenReport "report name", acViewPreview, , "BadgeNum=" & Me.textboxname
Review: http://www.allenbrowne.com/ser-62.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Sometimes it does this to me as well, you have to specify report view/print preview in the code behind the button or it typically auto-prints for me.
DoCmd.OpenReport, "rptName", acViewReport
or acViewPreview (will not print will just be in print preview).
I will give this a shot and let you know.
Thanks
Thanks, Resolved
Another issue; A report that has name repeated on many lines of the report I have selected the 'Hide Duplicate' option. When the report prints it is exactly what I want, however when the report displays and the print option message comes up no name are displayed. I assume I have missed a setting somewhere. Thanks