473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Open a specific report from a drop down box (not based on any criteria)

I want to create a drop down box that allows the user to open a specific report.

I want to list only certain reports and to list them by a user friendly name (not the back end naming convention that is not meaningful to the user).

These reports are already written and run on a query that is already written, the user is not running the report based on criteria just opening the report, preferably in report view not print preview.

Any feedback is appreciated.
Jan 7 '11 #1
4 1853
Lysander
344 Expert 100+
A simple solution, not the most elegant, but it should work.

Create a table with two fields, rptName and rptDesc, where rptDesc is the friendly name you want to display.

Poplualte the table with the reports you want the user to open.

Base a combo box on this table with two columns, rptName and Desc and make the 1st column 0 width.

This combo box, say, cboRpt, will show the friendly names

On the after update event of cboRpt

docmd.openreport cboRpt, acPreview,,,acDialog

(I probably have the commas in the wrong place, but you get the idea.
Jan 7 '11 #2
Lysander
344 Expert 100+
oops, missed the bit about not printpreview. Just use whatever option you want.
Jan 7 '11 #3
Fantastic! Works perfectly. I spent the whole day yesterday trying to get this to work properly. Thank you so very much.

I did update it as follows to open the Report View:

Private Sub cboRpt_AfterUpdate()
DoCmd.OpenReport cboRpt, acViewReport, , , acDialog
End Sub
Jan 7 '11 #4
Lysander
344 Expert 100+
You are most welcome. That's what the group are here for, to solve each other's problems:)
Jan 7 '11 #5

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

Similar topics

1
by: ashok76 | last post by:
Hi I've a DataGridView and where has column 0 is a DataGridViewComboBoxColumn Whenever I selected that cell then the drop down list not appeared on single click event hence I need to click again...
8
by: jsd219 | last post by:
Hello, George and Toby helped me out with a scripted to populate a drop down box from a dynamic section: I am having an issue with the drop down box. If there is only one row in the table the...
1
by: robcoles | last post by:
My first attempt at a single drop menu on test site:- www.drawtheline.com.au/test/new.html Can anyone help explain why the drop down from 'portfolio' button is not appearing on the net (safari,...
2
by: Nagstor | last post by:
hi I am trying to provide a alt text for the drop down items in ASP using a js function. this text is appearing correctly but is not dissappearing when mouseout event occurs. below is the code .....
1
by: dcrewhouse | last post by:
Hello-- I have been working with the problem for a while and have yet to find a solution. Does anyone know how to populate a drop down list box based on the selection from another drop-down in a...
1
by: deerick | last post by:
Hi there I want to know how to add a drop down list based on value from a table in an asp form. Then I want the user to be able to submit the form, and the drop down list value that they have...
3
by: mark.norgate | last post by:
Hi Another problem... My drop down is always defaulting to selecting the first item in the drop down, even though I've got code specifically to change it to a different item: Dim adapter...
2
by: axapta | last post by:
Hi Group, How can I limit a second drop-down list box based on a selected value in the first drop down list box. Using vb.net Regards
14
by: mjvm | last post by:
HI, I have had a search for the answer to this question, but I can't transfer what I am reading to my database. I don't know enough about the language required, but have been able to get my...
7
by: simulationguy | last post by:
This is causing my some grief :) I have a form that displays records in a tabular format, one field is a combo box that displays values from another table. But I only want some of those values...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.