Impossible task?

F

FBxiii

Hi. I have a table that stores a value relating to a 'percentage complete'
of tasks. (e.g. 10 represents 10%).

I want to be able to run a report that will display the percentage complete
in the form of progress bars on the report (2 text boxes of different colours
with widths relating to the percentage complete).

My problem is, there can be any number of rows in the table and need
multiple 'progress bars' for each row.

Is it possible to create textbox controls on reports before the report is
displayed? (My coding skills are pretty good so dont worry about
technicality)

Ive read through the table in the Reports On_Open event but each text box
has the same name as the others so they all show the same amount of progress.

Can anyone help or am I asking for a miracle!!

Cheers,
Steve.
 
D

Duane Hookom

You can display this with a couple rectangles. First add a yellow one named
"box100" that is the full 100 Pct width. Then add a green box named
"boxComplete" and align their top left corners and make them the same height.

Add your Pct complete text box to the report and name it "PctComp". Then
update the On Format event code to read:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.boxComplete.Width = Me.box100.Width * Me.PctComp / 100
End Sub
 
F

FBxiii

Thanks Duane, that works a treat.



Duane Hookom said:
You can display this with a couple rectangles. First add a yellow one named
"box100" that is the full 100 Pct width. Then add a green box named
"boxComplete" and align their top left corners and make them the same height.

Add your Pct complete text box to the report and name it "PctComp". Then
update the On Format event code to read:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.boxComplete.Width = Me.box100.Width * Me.PctComp / 100
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top