Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Question Unanswered: Autokey shortcut to text box in subform

    Hi everyone,

    I was expecting the following to be easy, but alas after spending too much time trying to sort it myself, I now find myself seeking help from you guys.

    I'm developing a database for a friend using Access 2007 and all I want to do is to create an autokey (in this case a Function Key assigned through an autokey macro) to jump directly to a field held in a subform. I believe the reference to be:

    Forms!MainFormName.SourceObjectName.SubformName.Fi eldName

    That certainly seems to put it in a 'nut shell', however, I've been unable to find a command that would actually do the directing.

    I'd appreciate any suggestions.
    Last edited by Charms7; 02-09-09 at 15:50.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    assuming you are in the parent form, you can do it two-step:
    me.NameOfSubformControl.setfocus
    me.NameOfSubformControl.Controls("NameOfTargetCont rol").setfocus ' space after 50 non-spaces is inserted by this site

    you can probably (i didn't check) do the same from anywhere to anywhere by multi-stepping the focus down the hierachy.

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    Quote Originally Posted by izyrider
    assuming you are in the parent form, you can do it two-step:
    me.NameOfSubformControl.setfocus
    me.NameOfSubformControl.Controls("NameOfTargetCont rol").setfocus ' space after 50 non-spaces is inserted by this site

    you can probably (i didn't check) do the same from anywhere to anywhere by multi-stepping the focus down the hierachy.

    izy
    question when you say name of target in
    me.NameOfSubformControl.Controls("NameOfTargetCont rol").setfocus
    do you mean the name of the suform??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •