Grygonos has asked for the wisdom of the Perl Monks concerning the following question:
sub activeDatabase { #get the present working directory $pwd = `cd`; #remove its \n chomp $pwd; return ($pwd . "\\xxx.mdb"); }
I can't capture the error because the screen dies before I can get a pause on it. But I have seen the error before and can tell you what it says basically.##Prints a report## sub printReport { my $source = shift; my $report_name = shift; #Make an Access.Application object my $app = Win32::OLE->new('Access.Application') or die "Failed to +print report!"; #Open the database $app->OpenCurrentDatabase($datasource); #Make it Invisible $app->{Visible} = 0; #Open the report in design mode $app->DoCmd->OpenReport($report_name,$accessConst->{'acViewDesign' +}); #Change the reports RecordSource property $app->Reports->Item($report_name)->{RecordSource} = $source; #Save the report $app->DoCmd->Save($accessConst->{'acReport'},$report_name); #Close the report $app->DoCmd->Close($accessConst->{'acReport'},$report_name); #Print the report $app->DoCmd->OpenReport($report_name); #Quit the application $app->DoCmd->Quit($accessConst->{'acQuitSaveNone'}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Running scripts on novell drives
by gellyfish (Monsignor) on Jul 07, 2003 at 13:38 UTC | |
by Grygonos (Chaplain) on Jul 07, 2003 at 13:42 UTC |