[AccessD] Any brilliant ideas - pictures in 'flexible' positi ons/pictures in reports

David McAfee DMcAfee at haascnc.com
Fri Apr 25 20:39:59 CDT 2003


Kath, try the following:
 
If Me.UsePhoto = True And  Nz(Me.PhotoLocation,"") <> "" Then
        BoolUsePhoto = True
        'Me.Photo.Top = 0
   '     Me.Photo.Height = 1200
        Me.Photo.Height = 3.5 * 567
        Me.Photo.Width = 5 * 567
        Me.Photo.Picture = Me.PhotoLocation
        Me.Photo.Visible = True
Else
    BoolUsePhoto = False
    Me.Photo.Height = 10
    Me.Photo.Width = 10 '<- Don't think this is necessary
    Me.Photo.Visible = False
    Me.Photo.Picture = ""
End If

'...later
If BoolUsePhoto = True Then
       Me.ServiceLongDesc.Width = 12.2 * 567
       Me.ServiceShortDesc.Width = 12.2 * 567
       Me.Section(7).Height = 1985
 Else
        Me.Section(7).Height = 600
        Me.ServiceLongDesc.Width = 16.75 * 567
        Me.ServiceShortDesc.Width = 16.75 * 567
End If
 
 
HTH
 
David McAfee

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Software Design &
Solutions Pty Ltd.
Sent: Friday, April 25, 2003 5:37 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Any brilliant ideas - pictures in 'flexible'
positions/pictures in reports


...I've now worked out that to avoid that gap I have to set my text box
height to a maximum of 3.5 cms (set in the on format event) when there is a
photo - otherwise the report expands the section needlessly. It limits me a
bit but for now I will work around that.
 
Kath
----- Original Message ----- 

From: Software Design  <mailto:SDSSoftware at optusnet.com.au> & Solutions Pty
Ltd. 
To: accessd at databaseadvisors.com <mailto:accessd at databaseadvisors.com>  
Sent: Saturday, April 26, 2003 10:02 AM
Subject: Re: [AccessD] Any brilliant ideas - pictures in 'flexible'
positions/ pictures in reports

Hi everybody - hope you had a good Easter.
 
I am back on this picture issue again - and like the other emails on this
topic I need to be able to expand my group header section of the report when
the picture exists.
 
In the 'On Format' event I am changing the height property of the photo
control. The actual size I need it to be is 3.5 cm x 5 cm.  (Code below). 
 
My problem is that the section is expanding and shrinking but AFTER A PHOTO
IS PRINTED I get an extra 2cm gap before the next detail record.
 
The section's 'Can grow' and 'Can shrink' properties are set to yes. I have
other controls in that section but for now I have taken most of them out to
try to nut this problem out - leaving 2 text boxes to the left of the photo
and *nothing* underneath it at all.
 
 
If Me.UsePhoto = True Then
    If IsNull(Me.PhotoLocation) Or Me.PhotoLocation = "" Then
        BoolUsePhoto = False
    Else
        BoolUsePhoto = True
        'Me.Photo.Top = 0
   '     Me.Photo.Height = 1200
        Me.Photo.Height = 3.5 * 567
        Me.Photo.Width = 5 * 567
        Me.Photo.Picture = Me.PhotoLocation
        Me.Photo.Visible = True
    End If
Else
    BoolUsePhoto = False
    Me.Photo.Height = 10
    Me.Photo.Width = 10
    Me.Photo.Visible = False
    Me.Photo.Picture = ""
End If

'...later
If BoolUsePhoto = True Then
       Me.ServiceLongDesc.Width = 12.2 * 567
       Me.ServiceShortDesc.Width = 12.2 * 567
       Me.Section(7).Height = 1985
 Else
        Me.Section(7).Height = 600
        Me.ServiceLongDesc.Width = 16.75 * 567
        Me.ServiceShortDesc.Width = 16.75 * 567
End If


----- Original Message ----- 
From: Stuart McLachlan <mailto:stuart at lexacorp.com.pg>  
To: Software Design  <mailto:SDSSoftware at optusnet.com.au> & Solutions Pty
Ltd. ; accessd at databaseadvisors.com <mailto:accessd at databaseadvisors.com>  
Sent: Thursday, April 03, 2003 11:02 AM
Subject: Re: [AccessD] Any brilliant ideas - pictures in 'flexible'
positions

On 3 Apr 2003 at 9:39, Software Design & Solutions P wrote:

> Hi everybody.. I am working on a system for a group of travel agents
> and today's task is to generate their quotes / itineraries. eg. Day 1,
> Rio, description of city, etc, Day 2 Manaus, description of tour etc. 
> 
> I have created the screen which will alow them for each day to select
> a city, one or more 'items' (eg. tour, hotel, flight details), and
> these will slot into the report when it is printed. 
> 
> They want the ability to drop photos in to the itineraries. When they
> select a particular item (city description) then the itinerary will
> always dislpay a photo. The users can select from a list of photo
> names held outside the database. 
> 
> But I am looking for some brilliant tips on how to place the photos
> into the report....when they nominate that a particular item should
> also include a photo, then the text should appear next to the photo,
> and when they only select text, the text should wrap to the whole
> page. 
> 
> I have a few ideas and will start but if anyone has does anything like
> this, I'd love to hear from you. 
> 

Three controls in the detail sectiop of the report:

txtItemWide, txtItemNarrow - both with  the item text as the source 
imgPhoto 

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Nz(ItemPhoto, "") > " " Then
    imgPhoto.Picture = PhotoFile
    imgPhoto.visible = true
    txtNarrow.visible = true
    txtWide.visible = false
Else
    imgPhoto.visible = false
    txtNarrow.visible = false
    txtWide.visible = true
End If

End Sub

-- 
Stuart McLachlan
Lexacorp Ltd
Application Development,  IT Consultancy
http://www.lexacorp.com.pg <http://www.lexacorp.com.pg> 

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com <mailto:AccessD at databaseadvisors.com> 
http://databaseadvisors.com/mailman/listinfo/accessd
<http://databaseadvisors.com/mailman/listinfo/accessd> 
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com> 




  _____  




_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030425/e09f0faa/attachment-0001.html>


More information about the AccessD mailing list