Bottom Align Contents of a Fixed Height Text Box

N

neal.poeppelmeier

I hope someone can help me with this alignment snag I've run into.

With growing or shrinking Text Boxes with VBA code, I would like for
my 4" fixed-height Text box show the user the bottom of a [Notes]
field, which is formatted to Memo in Access 2003.

As we scroll through accounts (think of a call center who has to log
hundreds of calls or of a client contact database which has a decades
worth of notes on a client), the latest entries are the most important
to look through at a glance. Currently, users have to select the fixed-
height Text box and hit F2 twice to jump to the bottom, hit Enter, and
begin a new note. All these key strokes are unnecessary if I could
just get the [Notes] text control box to default to a Bottom
alignment. This way, the vertical scroll bar would start at the
bottom, and if one needed to review an account's history (rarely
necessary), they could scroll up. Users could scroll through accounts
(every tables' primary key, so the form's Record # is a unique
account) and glance at recent activity.

Excel can bottom align, why can't Access? or can it? please help!
Thanks!!!

Neal
 
N

neal.poeppelmeier

I hope someone can help me with this alignment snag I've run into.

With growing or shrinking Text Boxes with VBA code, I would like for
my 4" fixed-height Text box show the user the bottom of a [Notes]
field, which is formatted to Memo in Access 2003.

As we scroll through accounts (think of a call center who has to log
hundreds of calls or of a client contact database which has a decades
worth of notes on a client), the latest entries are the most important
to look through at a glance. Currently, users have to select the fixed-
height Text box and hit F2 twice to jump to the bottom, hit Enter, and
begin a new note. All these key strokes are unnecessary if I could
just get the [Notes] text control box to default to a Bottom
alignment. This way, the vertical scroll bar would start at the
bottom, and if one needed to review an account's history (rarely
necessary), they could scroll up. Users could scroll through accounts
(every tables' primary key, so the form's Record # is a unique
account) and glance at recent activity.

Excel can bottom align, why can't Access? or can it? please help!
Thanks!!!

Neal

Sorry, I meant "WITHOUT growing or shrinking Text Boxes with VBA code"
 
L

Linq Adams via AccessMonster.com

Of course, if you don't mind going to the end of ***all textboxes*** you can
simply goto Tools - Keyboard and set "Behavior entering field" to "Go to end
of field."

To just do this for your Memo field textbox, you'll have to use the SelStart
Property.SelStart takes an Integer as an argument (which is limited to 32,767)
but a Memo field can hold twice that many characters (actually 4 times that,
I understand, if the data is entered via code) so you have to be careful
using it with these fields! If you want to place the cursor at the end of the
field, you should test it's length and if Len(YourMemoField) > 32767 set it
to 32767, which would at least get you a whole lot closer to the end of the
data. This code will do that:

If Len(YourMemoField) > 32767 Then
YourMemoField.SelStart = 32767
Else
YourMemoField.SelStart = Len(YourMemoField)
End If

I use it in both the OnEnter and OnClick events for my memos fields. I've
seen posts from some people claiming placing it in the OnEnter event is
sufficient, but in Access 2000 and 2003, with the service packs I use/used
(SP2 for v2003, don't remember for v2000) I always had to place it in both.
 
L

Linq Adams via AccessMonster.com

I'm sorry, Gina, but what are you talking about? First off, the OP is clearly
talking about navigating to the bottom of a textbox for a memo field; nothing
has been said about a subform. And secondly, placing the code you suggested
in the Form_Current event would mean that you could never do anything except
enter a new record! Every time you tried moving to an existing record,
whether to simply look at it or edit it or whatever, you would immediately be
taken to a new record!
 
G

Gina Whipp

Linq,

First, I did make a mistake, which I just noticed, that should have been
On_Open! Thanks for catching that.

As for the subform, it was a thought because of the way he said they get to
the notes partition that it MIGHT be a subform!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index.htm
 

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