Darren DICK
d.dick at uws.edu.au
Wed Mar 10 17:42:03 CST 2004
Hi Dan Taking this to the next level. You can determine what picture to show based on criteria. Try testing for the existence of the left brack on the phone number field as in (123) 1234 5678 and then displaying an image. If no bracket as in 1234 5678 then display the standard image eg I forgot to mention have the Image default properties set to Invisible (Visible = false) Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If IsNull(Me.PhoneNumber) Then Me.Image0.Visible = False Me.Image0.Height = 2 Me.Image0.Width = 2 Else Me.Image0.Visible = True If Left(Me.PhoneNumber, 1) = "(" Then Me.Image0.Picture = "C:\Image1.jpg" Else Me.Image0.Picture = "C:\Image2.jpg" End If Me.Image0.Height = 200 Me.Image0.Width = 200 End If End Sub ----- Original Message ----- From: "Darren DICK" <d.dick at uws.edu.au> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Thursday, March 11, 2004 10:34 AM Subject: Re: [AccessD] Images on Continuous Forms or Reports > HI Dan > Haven't done this but try something like this > Have the image control sizes virtually invisible > eg Width = 1 Height =1 > Then for each row that has the image visible try something like > (Testing only for a value in the phone number field (at Table Level not control level) of a contacts database) > > Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) > If IsNull(Me.PhoneNumber) Then > Me.Image0.Visible = False > Me.Image0.Height = 1 > Me.Image0.Width = 1 > Else > Me.Image0.Visible = True > Me.Image0.Height = 200 > Me.Image0.Width = 200 > End If > > End Sub > > Hope this helps and works > > Darren > > > > > > ----- Original Message ----- > From: "Dan Waters" <dwaters at usinternet.com> > To: "Database Advisors" <accessd at databaseadvisors.com> > Sent: Thursday, March 11, 2004 9:36 AM > Subject: [AccessD] Images on Continuous Forms or Reports > > > > Hello to All! > > > > > > > > I have a need to display an image on a row in a continuous report. However, > > some rows will have an image and some won't. I know how to make that work. > > > > > > > > What I would like to be able to do is have the detail section of the report > > (or form) grow or shrink in accordance with the size of the image or whether > > or not the image exists. When I started this I assumed that the image > > control would have grow and shrink properties, but NO they don't! > > > > > > > > I also looked at bound and unbound object frames, but they also don't have > > grow and shrink properties. > > > > > > > > Can anyone point me in the right direction? > > > > > > > > Thanks! > > > > Dan Waters > > > > > > > > > > > > -- > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com