I bothered everyone on launching a report from a Combo Box on Friday. That
did not give me exactly what I wanted but it did work. I would like to have
all of the reports which I have listed in a Table appear on the screen with
their description. *****Mission completed.*****
I assumed that I could change my Combo Box [event procedure] to use a Text
Box. The text box is Called "Report Name". I see that Combo Boxes are
numbered(Combo0") Text boxes are not. I also want to use a "Double Click" as
the event starter.
The event looks like this:
Report_Name DblClick
Private Sub Report_Name_DblClick(Cancel As Integer)
DoCmd.OpenReport Report Name, acViewPreview
End Sub
Report name above was "Me.Combo0" in the original using a combo Box.
Joe - 14 Jan 2008 16:21 GMT
I think I got it It did not like the space between the words "Report Name"
changed it to "Report_Name"
> I bothered everyone on launching a report from a Combo Box on Friday. That
> did not give me exactly what I wanted but it did work. I would like to have
[quoted text clipped - 12 lines]
>
> Report name above was "Me.Combo0" in the original using a combo Box.
Douglas J. Steele - 14 Jan 2008 16:25 GMT
All controls are numbered if you add them from the tool box.
The reason many (most?) text boxes aren't numbered is because they're
created as bound controls, so pick up the name of the recordset field to
which they're bound.
That having been said, it's generally recommended that you rename all
controls to give them meaningful names. Does Combo0 tell you anything about
what's displayed in the control? Of course not. That's why you'd rename the
control to something like cboReportNames
Select the text box of interest to you, and look at the Properties tab.
That'll not only give the name of the control, but it'll also let you
associate code with it: look on the Events tab, set the On Dbl Click
property to [Event Procedure] then click on the ellipsis (...) to the right
of the property. That'll take you into the VB Editor, in the middle of
Private Sub NameOfControl_DblClick(Cancel As Integer)
End Sub

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I bothered everyone on launching a report from a Combo Box on Friday. That
> did not give me exactly what I wanted but it did work. I would like to
[quoted text clipped - 15 lines]
>
> Report name above was "Me.Combo0" in the original using a combo Box.
Joe - 14 Jan 2008 16:48 GMT
Thanks for the input. Now I have another Question. I would like to use a
comand button to close the form and return to the switchboard . I see "Open
switchBoard" but how do I close the form?
> All controls are numbered if you add them from the tool box.
>
[quoted text clipped - 36 lines]
> >
> > Report name above was "Me.Combo0" in the original using a combo Box.
Douglas J. Steele - 14 Jan 2008 17:26 GMT
DoCmd.Close acForm, "switchBoard", Save:=acNo

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Thanks for the input. Now I have another Question. I would like to use a
> comand button to close the form and return to the switchboard . I see
[quoted text clipped - 47 lines]
>> >
>> > Report name above was "Me.Combo0" in the original using a combo Box.
John Spencer - 14 Jan 2008 16:45 GMT
Try
Private Sub Report_Name_DblClick(Cancel As Integer)
DoCmd.OpenReport Me.Report_Name, acViewPreview
End Sub
Better yet try editing the name of the control to txtReportName and then use
DoCmd.OpenReport Me.txtReportName, acViewPreview

Signature
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.
>I bothered everyone on launching a report from a Combo Box on Friday. That
> did not give me exactly what I wanted but it did work. I would like to
[quoted text clipped - 15 lines]
>
> Report name above was "Me.Combo0" in the original using a combo Box.
Joe - 14 Jan 2008 18:06 GMT
Thank you all very much. I will post new on my next question.
> Try
>
[quoted text clipped - 25 lines]
> >
> > Report name above was "Me.Combo0" in the original using a combo Box.