Re: Placing focus in desired control of subform

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You can create a form level static variable and store the name of the
control in that variable. In the Current event of the form access the
variable and SetFocus to that control.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"cinnie" <cinnie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:063CCD67-176E-4DD4-8165-35B4BAF1903B@xxxxxxxxxxxxxxxx
I have a SubForm with several textboxes. (txt1, txt2, ...). the Main Form
has buttons cmdNext (DoCmd.GoToRecord , , acNext) and cmdPrev. When I
click
Next, say, the next record shows as expected and the subform updates as it
should. But I'd like the cursor to go back to the same textbox it was in
on
the previous record. If I'm in txt19 then click cmdNext, I want the
cursor
to return to txt19. Is this easy to do?

thanks
--
cinnie


.


Quantcast