Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vertically filled rectangle filling downwards 2

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
Hello, I am having trouble with Access 2003 creating a filled rectangle. I am using the VBA code to vertically fill a rectangle for a visual display of liquid within a tank.

Me.RectProgressBarRaw.Height = 2500: Me.Repaint

The rectangle is filling fine but in a downward direction. I would like this to fill in an upward direction, how is this possible please.

Thank you.
 
I forgot to mention the low level is 0 and the high level is 9000.
 
you also have to move the top up try
Me.RectProgressBarRaw = me.height 'bottem of form
Me.RectProgressBarRaw.Height = 0
Me.Repaint


Me.RectProgressBarRaw = me.height-20 'bottem of form
Me.RectProgressBarRaw.Height = 20
Me.Repaint
Me.RectProgressBarRaw = me.height-20-20 'bottem of form
Me.RectProgressBarRaw.Height = 20+20
Me.Repaint


 
Sorry s/b

Code:
Me.RectProgressBarRaw .Height = Me.RectProgressBarRaw .Height + 20
Me.RectProgressBarRaw .Top = Me.RectProgressBarRaw .Top - 20
Me.Repaint
 
You may want to consider using a Microsoft ProgressBar control? You can set the orientation vertically and it works well for a display like this. Using the on current event set the value based on a field value. I use this for task progress. It is easy and works well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top