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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Buttons on Forms!!!

Status
Not open for further replies.

Kckronic21

Programmer
Jul 29, 2001
81
US
Hi,

I have this problem. I have created several buttons on a form that go to several different reports. I am having to constantly change the name of the report so that they match my query names. I wanted to know if there was a way to update the code of my buttons to have the new report names after I manually change the report names.

Thanks
 
Quit renaming them (LOL)


Refer to the reports ordinal position in lieu of the name.

Ex:

Private Sub Command11_Click()
Dim dbs
Dim rptName
Set dbs = CurrentDb
rptName = dbs.Containers!Reports(0).Name
DoCmd.OpenReport (rptName)

End Sub Tyrone Lumley
augerinn@gte.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top