PC Review


Reply
Thread Tools Rate Thread

Access 2003 Report generation

 
 
hlamo
Guest
Posts: n/a
 
      14th May 2010
I have a report that contains the .Line method to draw a series of boxes
around controls that can vary in size depending on their data content. I
would like to have each box shape filled with a colour suitable to its
control data, rather than have a back-fill for the control data. Can you
please give me an idea as to how to code it. I have tried the .FillColor
property but without success. Thanks.
 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      14th May 2010
It would have helped if you had provided your existing code. However, I have
been able to shade a background with code like:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim intMaxHeight As Integer
Dim ctl As Control
Dim lngHilite As Long
lngHilite = 10092543 'pale yellow
'Find highest control in Detail section _
that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
If ctl.Height > intMaxHeight Then
intMaxHeight = ctl.Height
End If
End If
Next
'Draw a box around each control in Detail _
that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
'replace conditional formatting making the _
background of City=London pale yellow
If ctl.Name = "City" And ctl.Value = "London" Then
Me.Line (ctl.Left, ctl.Top)- _
Step(ctl.Width, intMaxHeight), lngHilite, BF
End If
Me.Line (ctl.Left, ctl.Top)- _
Step(ctl.Width, intMaxHeight), vbBlack, B
End If
Next
End Sub

--
Duane Hookom
Microsoft Access MVP


"hlamo" wrote:

> I have a report that contains the .Line method to draw a series of boxes
> around controls that can vary in size depending on their data content. I
> would like to have each box shape filled with a colour suitable to its
> control data, rather than have a back-fill for the control data. Can you
> please give me an idea as to how to code it. I have tried the .FillColor
> property but without success. Thanks.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access metadata repository generation query, matrix generationquery, table-generation query, array-generation query. Roy Roebuck Microsoft Access Database Table Design 1 20th Dec 2008 07:23 PM
Access 2007 Report generation in VBA Preston Microsoft Access VBA Modules 10 23rd Jun 2008 04:50 PM
2 questions -frontpage 2003 and access - multiuser and report generation Cheryl Microsoft Frontpage 1 22nd Apr 2004 03:58 PM
Generation of User Defined Report in Ms Access vikash.verma Microsoft Access Forms 0 15th Mar 2004 01:02 PM
Generation of User Defined Report in Ms Access vikash.verma Microsoft Access Form Coding 0 15th Mar 2004 01:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:41 PM.