🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #15396

Re: Access97 to VB6

#15396
From: Development
Date: Fri, 06 Oct 2000 00:00
88 lines
3930 bytes
pOSTmASTEr, please find the answer from Duane Hookom in the Access /
Reports newsgroup below. It's a nice code snippet to 'resize', but I am
not sure it will hold with a great many tables in the Relationships
report. I don't have time right now, but I'll give it a go with a
70-tables db asap and come back with the test results.

Good luck,

Waldo Smets
SoftwareSuite�
Heverlee - LEUVEN

(Niet toegelaten commerci�le boodschap: Wij zoeken momenteel nog 3
enthousiaste programmeurs met minimaal 3 jaar ervaring in VBA Access.
Werken in de allerbeste omstandigheden!
Mail je CV met vermelding van telefoonnr�.)

Duane's reply:

You can scale any report with the code listed below. The report may
still
think you have more pages than needed so select the number of pages
based on
the preview. The code basically cycles through all controls and changes
their Left, Top, Height, Width, and font size of all the controls.

Private Sub Report_Open(Cancel As Integer)
   Dim sngScale As Single
   Dim sngInches As Single
   On Error Resume Next  'who cares about errs
   sngInches = 6  'want report this wide
   sngScale = (sngInches * 1440) / Me.Width 'figure the scale
   Me.Width = Me.Width * sngScale 'probably does nothing
   Me.Section(0).Height = Me.Section(0).Height * sngScale
   Dim ctrl As Control
   For Each ctrl In Me.Controls
      ctrl.Top = ctrl.Top * sngScale
      ctrl.Height = ctrl.Height * sngScale
      ctrl.Width = ctrl.Width * sngScale
      ctrl.Left = ctrl.Left * sngScale

      If TypeOf ctrl Is TextBox Then
         ctrl.FontSize = ctrl.FontSize * sngScale
      End If
      If TypeOf ctrl Is ListBox Then
         ctrl.FontSize = ctrl.FontSize * sngScale
      End If
      If TypeOf ctrl Is Label Then
         ctrl.FontSize = ctrl.FontSize * sngScale
      End If
   Next
End Sub



"Development@SoftwareSuite.be" wrote:
> 
> Mmmm... interesting. The Print Relationships Add-In (built-in since 2000
> version) gives us problems too... when the amount of tables is too
> big... About all you can seem to do is setting the page layout to
> landscape. When tables are numerous, even that doesn't help anymore.
> Maybe 3rd party software can help, but Access development packages often
> include a range of things you can easily program yourself, so there is
> no point in buying the whole package....
> 
> I will put the question on the MS newsgroups and see if anything comes
> back....
> 
> Good luck,
> 
> Waldo Smets
> SoftwareSuite�
> Heverlee - LEUVEN
> 
> (Niet toegelaten commerci�le boodschap: Wij zoeken momenteel nog 3
> enthousiaste programmeurs met minimaal 3 jaar ervaring in VBA Access.
> Werken in de allerbeste omstandigheden!
> Mail je CV met vermelding van telefoonnr�.)
> 
> pOSTmASTEr wrote:
> >
> > How can I visualize en printout my relationships in Access97
> > The problem is that my database is too big!!
> > I already tried the AddIn 'Print Relationships' but no success
> >
> > TIA
> >
> > pOSTmASTEr
Technical Details
Message-ID: <39DDB53B.4A692CF5@softwaresuite.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39dc23c4$0$4493$73bec57d@news.be.uu.net> <39DCD386.3A330DCD@softwaresuite.be>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fcea4,493ae2376446e9d5
X-Google-Attributes: gidfcea4,public
X-Google-Thread: 1143a7,493ae2376446e9d5
X-Google-Attributes: gid1143a7,public
From: "Development@SoftwareSuite.be" <development@softwaresuite.be>
Subject: Re: Access97 to VB6
Date: 2000/10/06
Message-ID: <39DDB53B.4A692CF5@softwaresuite.be>
X-Deja-AN: 678276670
Content-Transfer-Encoding: 8bit
References: <39dc23c4$0$4493$73bec57d@news.be.uu.net> <39DCD386.3A330DCD@softwaresuite.be>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@chello.be
X-Trace: news.chello.be 970831181 195.162.216.140 (Fri, 06 Oct 2000 13:19:41 MET DST)
Organization: Chello Usenet Service
MIME-Version: 1.0
NNTP-Posting-Date: Fri, 06 Oct 2000 13:19:41 MET DST
Newsgroups: be.comp.programming,comp.lang.basic.visual.database