You'll need to refer to the Text property of the control instead of the
Value property (which is the default property). The Text property is only
accessible when the control has the focus, so you may still have to deal
with the selection issue, but you can do that by using the SelStart
property. The following example is untested, from memory, but should
hopefully serve to point you in the right direction ...
Dim txt As Textbox
Dim strTheText as String
Set txt = Forms!NameOfForm!NameOfTextBox
With txt
.SetFocus
strTheText = .Text
.SelStart = Len(.Text)
End With
--
Brendan Reynolds
"Dave Griffiths" <da**@k2computers.co.uk> wrote in message
news:c0*******************@news.demon.co.uk...
Access 97 - I have a form with a single unbound text field. I want to have
a timer event which periodically saves the contents of that field. But I
noticed that if the focus stays on the field then then the text doesn't
get saved. It's like the text isn't there until focus is moved off the field.
So does anyone know how to grab the contents of an "uncommitted" field
without moving the focus?
By the way, I tried moving the focus away, saving, then moving back, which
works except that at the end of this all the text is highlighted, which
means the next character typed wipes everything !!
Hope this makes sense
Dave