Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a FORM on start and choose Subforms to open 1

Status
Not open for further replies.

villsthearcher

Technical User
Oct 20, 2005
27
US
Hello,

I have 4 reports and I open these reports from 4 different coressponding forms.

What I intend to do is, Create one FORM and then have Radio buttons / check boxes in it. On selecting a Radio button/ check box, another Form is opened, through which I will open the corresponding Report.

Can anyone tell me how to do this, with a minimal use of code?



Thanks,
villsthearcher
 
How are ya villsthearcher . . .

If you use an [blue]Option Group[/blue] problem is easy. In the [blue]AfterUpdate[/blue] event of the Option Group, copy paste the following ([blue]you![/blue] substitute proper names in [purple]purple[/purple]):
Code:
[blue]   Dim rptName as String
   rptName = Choose(Me![purple][b]OptGrpName[/b][/purple].Value, "[purple][b]ReportName1[/b][/purple]", _
                                         "[purple][b]ReportName2[/b][/purple]", _
                                         "[purple][b]ReportName3[/b][/purple]", _
                                         "[purple][b]ReportName4[/b][/purple]")
   DoCmd.OpenReport rptName[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top