G
Guest
hi - if someone could help with this that would be great - I must be doing something stupid :-
I have a VB6 form (relevant code below) which on load populates a list of available reports, then when the user selects one & clicks OK tries to do a DoCmd.Open Report - but the code hangs on that line and I have to stop the msaccess.exe process in Task Manager.
Thanks for any help
Option Explici
Private mobjAccessApp As Access.Applicatio
Private mobjAccessReport As Access.AccessObjec
Private Sub Form_Load(
' populate list of report
Set mobjAccessApp = CreateObject("Access.Application"
mobjAccessApp.Visible = Fals
mobjAccessApp.OpenCurrentDatabase gstrdbFolder & "St Columba.mdb
For Each mobjAccessReport In mobjAccessApp.CurrentProject.AllReport
lstReports.AddItem mobjAccessReport.Nam
Nex
End Su
Private Sub cmdOK_Click(
mobjAccessApp.DoCmd.OpenReport lstReports.Tex
mobjAccessApp.CloseCurrentDatabas
End Sub
I have a VB6 form (relevant code below) which on load populates a list of available reports, then when the user selects one & clicks OK tries to do a DoCmd.Open Report - but the code hangs on that line and I have to stop the msaccess.exe process in Task Manager.
Thanks for any help
Option Explici
Private mobjAccessApp As Access.Applicatio
Private mobjAccessReport As Access.AccessObjec
Private Sub Form_Load(
' populate list of report
Set mobjAccessApp = CreateObject("Access.Application"
mobjAccessApp.Visible = Fals
mobjAccessApp.OpenCurrentDatabase gstrdbFolder & "St Columba.mdb
For Each mobjAccessReport In mobjAccessApp.CurrentProject.AllReport
lstReports.AddItem mobjAccessReport.Nam
Nex
End Su
Private Sub cmdOK_Click(
mobjAccessApp.DoCmd.OpenReport lstReports.Tex
mobjAccessApp.CloseCurrentDatabas
End Sub