I open a second database from my first one using the following code
to save having multiple databases open I have added the "closecurrentdatabase" command to the code.
However, instead of leaving one incidence of Access open and just closing the existing program it is creating a new one so I end up with multiple incidences of Access which gets messy as I need to come back to the first DB from the second as well.
I can see that the followhyperlink command is triggering another incidence of Access before the "closecurrentdatabase" is actioned but if I place this command in front of the followhyperlink command the database closes and the hyperlink doesn't run.
Any suggestions welcomed.
Peter
Code:
Private Sub Command14_Click()
On Error GoTo Err_command14_Click
DoCmd.Close acForm, "client action amended", acSaveYes
Application.FollowHyperlink DLookup("[Link]", "links", "[linkname] = 'DebtProjector'")
CloseCurrentDatabase
Exit_command14_Click:
Exit Sub
Err_command14_Click:
MsgBox Err.Description
Resume Exit_command14_Click
End Sub
to save having multiple databases open I have added the "closecurrentdatabase" command to the code.
However, instead of leaving one incidence of Access open and just closing the existing program it is creating a new one so I end up with multiple incidences of Access which gets messy as I need to come back to the first DB from the second as well.
I can see that the followhyperlink command is triggering another incidence of Access before the "closecurrentdatabase" is actioned but if I place this command in front of the followhyperlink command the database closes and the hyperlink doesn't run.
Any suggestions welcomed.
Peter