![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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! |
#3
| |||
| |||
|
|
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! |
#4
| |||
| |||
|
|
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! |
#5
| |||
| |||
|
|
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! |
#6
| |||
| |||
|
|
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! |
#7
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |