how to control size of a bound object

G

Guest

Please help me...... I need to generate a report with various figures that
are contained in a bound table field. When the report is generated, I cannot
get the shrink, grow command to work for a bound object, only for a text box.
Does anyone know how to get around this, via macros or code? I would
appreciate your help so very much.
 
A

Al Campagna

auntboo,
I'm confoosed... is the field value a numeric or text? I assume by "various figures"
that you mean numeric...
You wrote...
I cannot get the shrink, grow command to work for a bound object,
only for a text box.
If the control is not a text control... what is it? "Bound object" doesn't tell us
anything.

The confusing part is that a text control bound to a numeric table field shouldn't (and
can't) grow or shrink. It displays the one numeric value, and if the control width is
sufficient, should display that value completely. Grow and shrink apply to text that has
the ability to Wrap. Numbers can't do that.
You could try converting the numeric value to text with =Str(SomeNumericValue)... but I
really don't understand why that would be necessary.

Show us some examples of what you have for the data and describe your controls... how
it appears now, and how you would like it to appear.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
G

Guest

This is the deal, I use snapshot to take a portion of math questions from on
line exams, and place in access. This allows me to build a database with 3
years worth of data and to query the questions that pertain to a particular
objective. I then use the report to discuss test taking strategies with the
students. You can image the questions that have figures ( ie, buildings for
calculating proportions, 3d shapes for geometry, charts and graphs for
statistics) images, etc that the students need to see in order to be able to
answer. I place these snapshots in the table as an ole object under the name
of "testquestion" , then run a report based on a query from this table. In
the report, the field testquestion defaults to a bound object. I would like
the report to adjust the field "testqestion" and can grow/ can shrink would
be ideal. I'm not sure why access does not allow this, seems reasonable to
me. Can you help me with this? Standarized testing is only a few weeks
away!!
Aunt Boo.
 
A

Al Campagna

If you're saying that these "TestQuestions" are graphics... (pictures of text and/or
diagrams) then I know of no way to apply Grow or Shrink to those objects. Grow/Shrink
only applies to text fields.
It is impractical (read impossible) to try to resize Ole objects "on the fly" in a
report.

Go to Google groups, and put this in the Search Groups...
public.access "ole object" "can Grow"
From the various responses, you'll see that it is impractical, and not recommended.

I can only suggest (if I really understand exactly what you're doing here) that you
edit all your graphics with a graphics editing program (the geomteric figures, the charts,
etc...) to "one standard size graphic fits all." Enlarge or downsize all graphics to a
common width and height. Then in a text field you add to the table, retype the test
question.
Now, at least the question "text" can Grow and Shrink.

Picture Text
______
| | Text ........
| | ................
|______| ................
.................
................
.................
................
______
| | Text ........
| | ................
|______|

______
| | Text ........
| |
|______|

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
S

Stephen Lebans

Hi Al,
first of all I agree with your suggestion to set one size for the OP's
graphics. It's the simplest method to solve the OP's issue. But for
completeness of this thread I would mention a couple of points/options.

Embedded OLE objects that are Images are relatively straighforward to
autosize.
http://www.lebans.com/autosizeole.htm

Embedded Snapshot objects would be more difficult to autosize but I think it
could be done. The Snapshot file is a form of compressed Structured Storage.
The file is comprised of Enhanced Metafiles(EMF), one for each page of the
report. The EMF header exposes the dimensions of the Image. There's code on
my site to break out the Snapshot file into its component EMF's. I would
probably overlay an Image control on top of the OLE Frame control and
display the EMF directly.

I finished some lengthy OLE Structured Storage work for a customer tonight
so I am back up to speed. I'll think I'll expose a simple function to
convert Snapshot files to EMF's into this release of the StrStorage.DLL on
my site. The current spaghetti/hack to split Snapshot files on my site is a
nightmare at best.

Just my $.02

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

Al Campagna

Thanks Stephen,
I spent a while googling on "OLE" and Report", and "Can Grow", and found most of the
responses were discouraging in nature.
Wish I had run across your solution...
Perhaps if I had used "re-sizing" I might have discovered that.
Hope the OP checks back and sees your post.
Thanks, I'll recommend that if the question arises again.
--
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
G

Guest

I brought the snapshot clip into word to have a look at the size and the
snapshots vary in height from 5.64 inches to 1.57 inches . Is it possible to
email my table and report so that you might have a look?

The question I keep pondering is the abilitiy of a test bank being able to
produce reports that auto fit these figures. Different database, different
software maybe??
 
A

Al Campagna

auntboo,
Please see Stephen Leban's response in this thread. He has an autosizer routine on his
website. I have no experience with it personally, but his utilities are always excellent.
I would at least try that first...

If that doesn't work for you...
Have you tried resizing just the "images" (not the text), to say 2.5" common size...
and manually typing the text into a new field in your ole object table... as I suggested?
That is not an elegant solution, but it might be the quickest (and easiest) to
implement. There are many freeware graphics editors on the web (try Snapfiles.com) that
could be used to crop out just the image portion of each OLE, and resize those iamges to a
common size. You should just need a "cropper" and "resizer". You may even have some app
already that will do that (ex. MS Picture Manager that comes with XP)

I would not be able to take on your db at this time. My schedule right now just won't
permit it.
Someone may still volunteer, but I strongly suggest you wade in there and try the two
suggestions above.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
---------------------------------------------------------
 

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