How do I force row height for scrollable textboxs in a subform?

D

Doug

I have a form with a clients info. There is a subform with messages
(date field and a textbox). There can be multiple messages per client.
The row height of the message text box in the subform is set to the
height of one line of text. I want it to display two. Changing the
size in messages table properties, form properties, and in subform
properties (from inside the client form) all have no effect when
viewing the message list from the client form.

Any help appreciated.
 
J

John Nurick

Hi Doug,

The Access textbox doesn't have a Row Height property, so it's not
clear what you're talking about. If you want to control line spacing
within the textbox, use the LineSpacing property. For double spacing
you might use

With Me.txtXXX
.LineSpacing = .FontSize * 20 * 1.2
End With

The 20 converts from points to twips, and the 1.2 gives a conventional
comfortable line spacing.

If you want to control the height of the textbox, use its Height
property, e.g.
.Height = .FontSize * 20 * 1.2 * 2 'two lines
 
J

John Spencer

It sounds as if the poster is using a subform and displaying the DataSheet
view and wants the ROW height in the datasheet view to be two lines.

As a test, I created a form with a subform in design view and put a button
on the main form with the following code

Private Sub Command6_Click()
Dim frmAny As Form
Set frmAny = Me.sfrmFAQ.Form
frmAny.RowHeight = 1440 * 0.5
End Sub

That changed the row height.

Normally, I would just drag the row height to whatever I want it to be.
Place the cursor at the dividing line (get the two-headed arrow) and drag
the line up or down. Access normally remembers the rwo height until I
change it.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
J

John Nurick

It sounds as if the poster is using a subform and displaying the DataSheet
view and wants the ROW height in the datasheet view to be two lines.

Good catch, John.
 

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