Conditional Centering of text

G

Guest

I would like to center the printout in a text box based on a Yes/No field set
on. Apparently centering of text is not available in Conditional Formatting.
Is there sample code I can go to for this?

Also I want to set Can Grow and Can Shrink on for this text box. When
Conditional Formatting is used and either Can Grow or Can Shrink or both is
set on, nothing prints!

Please, any help as soon as possible is appreciated.

Thanks

MIKE
 
S

Stephen Lebans

Forget about Conditional Formatting. Simply set the control's props
inthe Format event of the section containing the control(s) in question.

--

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

Guest

This is the detail section, so are you talking about the On Format property?
Should I use the Code option there?

MIKE
 
S

Stephen Lebans

In the Format event of the Detail section you would place code to do
something like:

If NameOfBooleanControl.Value = True Then
NameOfTextBoxWhereYouWantTextCentered.TextAlign = 2 ' centered
Else
NameOfTextBoxWhereYouWantTextCentered.TextAlign = 0 ' general
End if

--

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

Guest

Stephen:

That is a keeper, it worked just right. Thanks so much. We're going with it!

MIKE
 

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