lebans richtext control, subform question

lebans richtext control, subform question

Post by tlyczk » Fri, 10 Mar 2006 05:24:34


I have Stephen Lebans' RichText control on a subform, which is bound to
a memo field.
The only editable control on this subform is the rich text control for
the memo field.

When the main form opens, the first record of the subform cannot be
typed into.

The only way to fix this is to page to the next record, then page back
to the first record, then one can type into the rich text control to
enter text.

Why does this happen, what can I do to prevent this??

I tried setting Me.Dirty in various form events but doing this requires
a bound control to a text box or a combo box, neither of which are
possible to add to this subform.

I also tried using DoCmd.RunCommand acCmdRecordsGoToNext and then
DoCmd.RunCommand acCmdRecordsGoToPrevious in the subform's OnLoad
event, to simulate the manual fix described above, but this does not do
anything...

Thank you for your help, Tom
 
 
 

lebans richtext control, subform question

Post by tlyczk » Fri, 10 Mar 2006 05:41:45

I have noticed that since I put in the richtext control that it takes
several seconds for the subform's associated recordset to become
found/noticed enough for the recordcount to display...and this is with
the default Access nav controls.

If I wait for the recordcount number to appear, then the first record
becomes suitably editable, though it always starts at the beginning of
the form.

I was able to set Me.Dirty=True in teh richtext control's GotFocus
event.

How to make the cursor appear at the END of any already-typed text in
this richtext control?? I will look again at the properties in the
meantime.

Thank you, Tom

 
 
 

lebans richtext control, subform question

Post by tlyczk » Fri, 10 Mar 2006 05:55:03

I found this:
"If you want to simulate keypresses, you can use SendKeys. For this
situation, specifically, you'd probably want to use: SendKeys("{END}")
"
from:
http://www.yqcomputer.com/ +at+the+end&rnum=2#fb7fdd54cdc7bfe8
It seems to work now...regardless of the recordcount numbers showing up
very slowly even for a small/tiny recordset.
Thank you, Tom
 
 
 

lebans richtext control, subform question

Post by Stephen Le » Fri, 10 Mar 2006 11:05:34

Access does not support the use of ActiveX controls on Subforms. Yes I know,
many of them work without problem but the focus/UI issue you mentioned is
the most common problem.

--

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