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

Calling Access page question?

Status
Not open for further replies.

TheunsGoosen

Technical User
Jan 17, 2007
36
GB
(Access beginner)
I'm using the following code to call a form from a switchboard, can someone help me with the code to call access page with the same name.


Private Sub Label78_Click()
On Error GoTo Err_Command116_Click

Dim stDocName As String

stDocName = "R001ComponentPriceT001"
DoCmd.OpenReport stDocName, acPreview

Exit_Command116_Click:
Exit Sub

Err_Command116_Click:
MsgBox Err.Description
Resume Exit_Command116_Click
End Sub

Thanks
 
There is a wizard that will guide you through opening a page. If you choose a command button from the toolbar, you will find that 'Page' is one of the options under Form Operations. The code will be something like this:

Code:
    stDocName = "Page1"
    DoCmd.OpenDataAccessPage stDocName, acDataAccessPageBrowse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top