dbTalk Databases Forums  

Rectangles on a form

comp.database.ms-access comp.database.ms-access


Discuss Rectangles on a form in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MS
 
Posts: n/a

Default Rectangles on a form - 07-15-2004 , 11:22 PM






Is there a way of drawing rectangles on a form in code?

Using the line method on a report works fine. Is there an eqivalent for a
form?

Cheers!



Reply With Quote
  #2  
Old   
Peter Flick
 
Posts: n/a

Default Re: Rectangles on a form - 07-19-2004 , 08:41 AM






Dear MS,

Open the form use ToolBox\Rectangle to draw a rectangle.

You can make the rectangle react to changes in data.
ie change colour: input STOP rectangle changes to Red, input GO
rectangle changes to Green, etc.
Size and position on screen can also be changed.

Regards

Peter

MS wrote:
Quote:
Is there a way of drawing rectangles on a form in code?

Using the line method on a report works fine. Is there an eqivalent for a
form?

Cheers!



Reply With Quote
  #3  
Old   
MS
 
Posts: n/a

Default Re: Rectangles on a form - 07-19-2004 , 09:26 PM



Thanks, but that's what I've been doing.

It would be better to be able to draw the rectangles programatically because
it is for a printing quoting program, and I need to display the "step and
repeat" layout. Most of the time there are only 4 or 5 "boxes" on the
sheet - but sometimes there could be 2 or 3 hundred.

So, what I have at the moment is is 500 invisible boxes (Box1, Box2, Box3
etc) that are made visible and positioned when required.

But this is messy, a pain to draw, and a pain to individually name each one
etc.

The application that I've written has been used successfully in our
organisation for a while now, but I've been wanting to tidy a few things up
in it - and the graphic display was one of them.

It seems wierd that you can draw a box on a report using the line method,
but not on a form.

By the way, it's in Access 97.

Cheers!

"Peter Flick" <pflick (AT) bigpondXXremoveXX (DOT) net.au> wrote

Quote:
Dear MS,

Open the form use ToolBox\Rectangle to draw a rectangle.

You can make the rectangle react to changes in data.
ie change colour: input STOP rectangle changes to Red, input GO
rectangle changes to Green, etc.
Size and position on screen can also be changed.

Regards

Peter

MS wrote:
Is there a way of drawing rectangles on a form in code?

Using the line method on a report works fine. Is there an eqivalent for
a
form?

Cheers!





Reply With Quote
  #4  
Old   
Peter Flick
 
Posts: n/a

Default Re: Rectangles on a form - 07-20-2004 , 09:03 AM



Dear MS,

Let's start again!

You want boxes to print in a report not in a form.

I presume that the 1 to 500 boxes relates to information in detail
lines.

You only need one box that will repeat for the number of detail
entries that you have.

Does your report look like this:

Quote Header

Line 1 Detail Box
Line 2 Detail Box
Line 3 Detail Box

Quote Footer

The above would only require one box to be specified.

If you are trying to print a report using a form, then I suggest you
make it into a report.

Can you be more specific on what the boxes are for.

Peter

MS wrote:
Quote:
Thanks, but that's what I've been doing.

It would be better to be able to draw the rectangles programatically because
it is for a printing quoting program, and I need to display the "step and
repeat" layout. Most of the time there are only 4 or 5 "boxes" on the
sheet - but sometimes there could be 2 or 3 hundred.

So, what I have at the moment is is 500 invisible boxes (Box1, Box2, Box3
etc) that are made visible and positioned when required.

But this is messy, a pain to draw, and a pain to individually name each one
etc.

The application that I've written has been used successfully in our
organisation for a while now, but I've been wanting to tidy a few things up
in it - and the graphic display was one of them.

It seems wierd that you can draw a box on a report using the line method,
but not on a form.

By the way, it's in Access 97.

Cheers!

"Peter Flick" <pflick (AT) bigpondXXremoveXX (DOT) net.au> wrote in message
news:wcQKc.7771$K53.4920 (AT) news-server (DOT) bigpond.net.au...

Dear MS,

Open the form use ToolBox\Rectangle to draw a rectangle.

You can make the rectangle react to changes in data.
ie change colour: input STOP rectangle changes to Red, input GO
rectangle changes to Green, etc.
Size and position on screen can also be changed.

Regards

Peter

MS wrote:

Is there a way of drawing rectangles on a form in code?

Using the line method on a report works fine. Is there an eqivalent for

a

form?

Cheers!






Reply With Quote
  #5  
Old   
MS
 
Posts: n/a

Default Re: Rectangles on a form - 07-20-2004 , 09:46 PM



Thanks.

The report is no problem. I just draw the boxes using code at run time with
the Line method.

The problem is that I want to achieve the same thing in the form (to
graphically view the layout on the form) that I can achieve in the report.
Using either Rectangle or Line method.

This is for a printing quote program. Different layouts need to be "tried"
to get the best layout for the best yield. Sometimes you'll try 2, 3, 4 or
more "scenarios" before committing to the quote, and printing the report.

In a nut shell, I want the form to look like the report will look before
going to the report.

Access doesn't seem to allow you to do this purely in code on a form -
though I have achieved it in VB6.

So what I have is a rather clumsy set up where hundreds of small, invisible
boxes are drawn on the form at design time and made visible and positioned
when required at run time.

It would be so much nicer to be able to create the "boxes" in code at run
time like you can in the report.

As I said - the program is running fine the way it is. I just would like to
tidy a few things up. Having 500 plus boxes on the form is messy.

Cheers!

"Peter Flick" <pflick (AT) bigpondXXremoveXX (DOT) net.au> wrote

Quote:
Dear MS,

Let's start again!

You want boxes to print in a report not in a form.

I presume that the 1 to 500 boxes relates to information in detail
lines.

You only need one box that will repeat for the number of detail
entries that you have.

Does your report look like this:

Quote Header

Line 1 Detail Box
Line 2 Detail Box
Line 3 Detail Box

Quote Footer

The above would only require one box to be specified.

If you are trying to print a report using a form, then I suggest you
make it into a report.

Can you be more specific on what the boxes are for.

Peter

MS wrote:
Thanks, but that's what I've been doing.

It would be better to be able to draw the rectangles programatically
because
it is for a printing quoting program, and I need to display the "step
and
repeat" layout. Most of the time there are only 4 or 5 "boxes" on the
sheet - but sometimes there could be 2 or 3 hundred.

So, what I have at the moment is is 500 invisible boxes (Box1, Box2,
Box3
etc) that are made visible and positioned when required.

But this is messy, a pain to draw, and a pain to individually name each
one
etc.

The application that I've written has been used successfully in our
organisation for a while now, but I've been wanting to tidy a few things
up
in it - and the graphic display was one of them.

It seems wierd that you can draw a box on a report using the line
method,
but not on a form.

By the way, it's in Access 97.

Cheers!

"Peter Flick" <pflick (AT) bigpondXXremoveXX (DOT) net.au> wrote in message
news:wcQKc.7771$K53.4920 (AT) news-server (DOT) bigpond.net.au...

Dear MS,

Open the form use ToolBox\Rectangle to draw a rectangle.

You can make the rectangle react to changes in data.
ie change colour: input STOP rectangle changes to Red, input GO
rectangle changes to Green, etc.
Size and position on screen can also be changed.

Regards

Peter

MS wrote:

Is there a way of drawing rectangles on a form in code?

Using the line method on a report works fine. Is there an eqivalent for

a

form?

Cheers!








Reply With Quote
  #6  
Old   
Carol and Doug Hutcheson
 
Posts: n/a

Default Re: Rectangles on a form - 08-10-2004 , 12:46 AM



MS,

You can add controls to a form 'on the fly', but you have to drive this
through code which puts the form into design mode, makes the chages,
then puts it back into display mode. For this reason, you want the form
to be stored in a local copy of Access, not in a back-end database
running across the network (because you might get more than one person
trying to change the same form, which gets confusing when Access asks
you to save your changes....). Also, as the length of a form in Access
is limited, programmatically adding controls may cause you to hit the
page length limit. Ouch!

Perhaps you could approach this by using continuous forms...?

Just my $0.02
Doug


MS wrote:
Quote:
Thanks.

The report is no problem. I just draw the boxes using code at run time with
the Line method.

The problem is that I want to achieve the same thing in the form (to
graphically view the layout on the form) that I can achieve in the report.
Using either Rectangle or Line method.

This is for a printing quote program. Different layouts need to be "tried"
to get the best layout for the best yield. Sometimes you'll try 2, 3, 4 or
more "scenarios" before committing to the quote, and printing the report.

In a nut shell, I want the form to look like the report will look before
going to the report.

Access doesn't seem to allow you to do this purely in code on a form -
though I have achieved it in VB6.

So what I have is a rather clumsy set up where hundreds of small, invisible
boxes are drawn on the form at design time and made visible and positioned
when required at run time.

It would be so much nicer to be able to create the "boxes" in code at run
time like you can in the report.

As I said - the program is running fine the way it is. I just would like to
tidy a few things up. Having 500 plus boxes on the form is messy.

Cheers!

"Peter Flick" <pflick (AT) bigpondXXremoveXX (DOT) net.au> wrote in message
news:%C9Lc.9013$K53.1101 (AT) news-server (DOT) bigpond.net.au...

Dear MS,

Let's start again!

You want boxes to print in a report not in a form.

I presume that the 1 to 500 boxes relates to information in detail
lines.

You only need one box that will repeat for the number of detail
entries that you have.

Does your report look like this:

Quote Header

Line 1 Detail Box
Line 2 Detail Box
Line 3 Detail Box

Quote Footer

The above would only require one box to be specified.

If you are trying to print a report using a form, then I suggest you
make it into a report.

Can you be more specific on what the boxes are for.

Peter

MS wrote:

Thanks, but that's what I've been doing.

It would be better to be able to draw the rectangles programatically

because

it is for a printing quoting program, and I need to display the "step

and

repeat" layout. Most of the time there are only 4 or 5 "boxes" on the
sheet - but sometimes there could be 2 or 3 hundred.

So, what I have at the moment is is 500 invisible boxes (Box1, Box2,

Box3

etc) that are made visible and positioned when required.

But this is messy, a pain to draw, and a pain to individually name each

one

etc.

The application that I've written has been used successfully in our
organisation for a while now, but I've been wanting to tidy a few things

up

in it - and the graphic display was one of them.

It seems wierd that you can draw a box on a report using the line

method,

but not on a form.

By the way, it's in Access 97.

Cheers!

"Peter Flick" <pflick (AT) bigpondXXremoveXX (DOT) net.au> wrote in message
news:wcQKc.7771$K53.4920 (AT) news-server (DOT) bigpond.net.au...


Dear MS,

Open the form use ToolBox\Rectangle to draw a rectangle.

You can make the rectangle react to changes in data.
ie change colour: input STOP rectangle changes to Red, input GO
rectangle changes to Green, etc.
Size and position on screen can also be changed.

Regards

Peter

MS wrote:


Is there a way of drawing rectangles on a form in code?

Using the line method on a report works fine. Is there an eqivalent for

a


form?

Cheers!









Reply With Quote
  #7  
Old   
MS
 
Posts: n/a

Default Re: Rectangles on a form - 08-18-2004 , 04:16 PM




"Carol and Doug Hutcheson" <chutches (AT) bigpond (DOT) net.au> wrote

Quote:
MS,

You can add controls to a form 'on the fly', but you have to drive this
through code which puts the form into design mode, makes the chages,
then puts it back into display mode. For this reason, you want the form
to be stored in a local copy of Access, not in a back-end database
running across the network (because you might get more than one person
trying to change the same form, which gets confusing when Access asks
you to save your changes....). Also, as the length of a form in Access
is limited, programmatically adding controls may cause you to hit the
page length limit. Ouch!

Perhaps you could approach this by using continuous forms...?

Just my $0.02
Doug

Thanks.

I had considered this, but going back to design mode to try different
scenarios repeatedly is probably messier than having many small invisible
"boxes" that are called on, sized, positioned and made visible as required.

It seems wierd that forms in VB have a line method, but forms in Access97
don't.

Cheers!




Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.