Do command

A

Amateur

I am opening with a command button a Form in a databese like:
Private Sub Abrir_balanzas_Click()
On Error GoTo Err_Abrir_balanzas_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Balanzas BIE30P"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Abrir_balanzas_Click:
Exit Sub

Err_Abrir_balanzas_Click:
MsgBox Err.Description
Resume Exit_Abrir_balanzas_Click

End Sub


How can I change this Do Command that it is insead of opening a Form opening
another Database.
The name of the database which I would like to open is "trading.mdb
Thanks
Klaus
 
F

fredg

I am opening with a command button a Form in a databese like:
Private Sub Abrir_balanzas_Click()
On Error GoTo Err_Abrir_balanzas_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Balanzas BIE30P"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Abrir_balanzas_Click:
Exit Sub

Err_Abrir_balanzas_Click:
MsgBox Err.Description
Resume Exit_Abrir_balanzas_Click

End Sub

How can I change this Do Command that it is insead of opening a Form opening
another Database.
The name of the database which I would like to open is "trading.mdb
Thanks
Klaus

Don't need a 'Do'.

Application.FollowHyperlink "c:\Path to Your Folder\Trading.mdb"
 
A

Amateur

Sorry Fred - I don't understand where I should insert your line:
Application.FollowHyperlink "c:\cps208\Trading.mdb"
Please specify
Thanks
Klaus
 
F

fredg

Sorry Fred - I don't understand where I should insert your line:
Application.FollowHyperlink "c:\cps208\Trading.mdb"
Please specify
Thanks
Klaus

The same place you already have the example code you posted, or if you
are using a different button, in that buttons Click event.

Private Sub Abrir_balanzas_Click()
On Error GoTo Err_Abrir_balanzas_Click

Application.FollowHyperlink "c:\cps208\Trading.mdb"

Exit_Abrir_balanzas_Click:
Exit Sub

Err_Abrir_balanzas_Click:
MsgBox Err.Description
Resume Exit_Abrir_balanzas_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top