HOW TO SHRINK OR GROW COMBO BOX

G

Glint

Hi Guys,
I have a form with several comboboxes and textboxes. I find the Can Shrink
and Can Grow properties of the textboxes very handy, especially when thier
data is nil or exceed the space I have provided when I print the form. Is
there a way I can make the combo boxes behave the same way?
 
J

Jeff Boyce

Glint

We may be talking about different objects. The combobox in an Access form
is only one "line" tall. Why would you need to have it "Grow"?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Glint

Thanks Jeff.
Actually, I want to see how I can save space by making the combo box narrow,
thereby forcing the data into a narrow column instead of a long line.
 
J

Jeff Boyce

"Grow" and "Shrink" are vertical, not horizontal. You won't get "narrow"
using them.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Glint

Thanks again, Jeff.
I guess the only option I have, if I love these properties so much, is to
use textboxes (with appropriate queries) to display the data of the printable
version of the form.
 
D

Dale Fye

Even with your explaination, I'm still not sure I'm on your wavelength about
this, but I'll give it a shot.

You could set the width of various columns in your combo box, to a total
width of 6 or 8 inches, but only show the combo box as 2" wide on the form.
If you are going to do this, make sure that the column that is 2 inches wide
is the first non-zero width column you want to display in the combo box.

Then, in the GotFocus event of the combo, change the width of the combo box
to the width you need to display all of the columns. Then, in the Click,
AfterUpdate and LostFocus events, change the width back to the original 2".
I occassionally use this technique when I want to display a short text
string, when viewing the record, but when editing or adding a record, want to
see more of the detail of the record behind the combo box.

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
G

Glint

Thank you very much for your tips, Dale. I am sure they will come handy.

However, what I am looking for right now is a way to make the data of the
combo box PRINT (on paper) in its entirety. As it is, when my combo box is 1
inch wide, and the data is more than 1 inch long, the data is truncated when
I print the form.

However, the Can Grow property of the textbox makes its data print in its
entirety by "growing" it downwards, even when the box is only 1inch wide when
the data is 3inch long.

I sincerely hope I am making sense.
 
D

Dale Fye

Glint.

Are you trying to print data on a form. I never print forms, they are
designed for data entry, not for reporting. Create a report, and instead of
a combo box, use a textbox to display the data. About the only controls I
ever use on a report are textboxes and checkboxes.

If your main table contains ID values that link to lookup tables, you may
have to modify the query for your report so that it captures the text from
the lookup tables, but once you have done this, then you can use a textbox in
your report.
--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
D

Dale Fye

And labels.

Dale Fye said:
Glint.

Are you trying to print data on a form. I never print forms, they are
designed for data entry, not for reporting. Create a report, and instead
of
a combo box, use a textbox to display the data. About the only controls I
ever use on a report are textboxes and checkboxes.

If your main table contains ID values that link to lookup tables, you may
have to modify the query for your report so that it captures the text from
the lookup tables, but once you have done this, then you can use a textbox
in
your report.
--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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