RE: Setfocus to a textbox
- From: Wayne-I-M <WayneIM@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 18 Oct 2006 06:34:02 -0700
Hi
You did not mention a subform in your post ?
If you want to set the focus to a field on a subform from a main form you
have to do this in 2 stages.
1st set the focus to the sub form
2nd set the focus to the field
If you can let me know some details - where are you trying to "fire" the
event from. name of the main form, name of the sub form, etc. I can send
back the code.
I may have misunderstood but I think you are trying to do "something" on a
main form that will clear the details (check box) om a subform - hope this is
right.
--
Wayne
Manchester, England.
Enjoy whatever it is you do
"Marcus Lloyd" wrote:
By adding 'Me', the same fault happens..
But I think its to do with a linked subform updating from a textbox after
the OnExit event has completed. Can't find an event for after the subform
updates, tried AfterUpdate but it does not trigger?
"Wayne-I-M" wrote:
Hi Marcus
txtLPN.SetFocus
txtLPN.Text = ""
Should be
Me.txtLPN.SetFocus
Me.txtLPN =" "
Hope this helps
--
Wayne
Manchester, England.
Enjoy whatever it is you do
"Marcus Lloyd" wrote:
Hi,
I have a form that has a textbox, subform, and a MSFlexGrid.
On Exit from the textbox I have code that adds the records to the flexgrid
after some processing, opening connections and recordsets to the DB.
At the end of the code the last thing the code does is to clear down the
textbox and sets the focus to it.
txtLPN.SetFocus
txtLPN.Text = ""
txtLPN.SetFocus
After the code executes the SetFocus method is called but the focus does not
set to the textbox.
I've also tried using DoCmd.GoToControl "txtLPN", but still the focus is not
on the textbox control.
Any ideas?
- Follow-Ups:
- RE: Setfocus to a textbox
- From: Marcus Lloyd
- RE: Setfocus to a textbox
- Prev by Date: Re: Textbox Format Property question
- Next by Date: Re: Form Event confusion
- Previous by thread: Re: Changing the back ground colour of a control if the value is null
- Next by thread: RE: Setfocus to a textbox
- Index(es):
Relevant Pages
|