Results 1 to 6 of 6
  1. #1
    k9drh is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    6

    Thumbs down Help with gotocontrol, activecontrol

    Well here's a new twist I would love some ideas on.


    I have a membership sign-in form that works great. Very simple scan bar code or manual <enter> populates info fields and TABS to Save and record. Then active control returns to scan bar code field. The problem is there is a Vistor Button on the form which opens a seperate form. Enter the visitor info and close. now comes the problem. The active control is still on the visitor button. I have tried to find a way to get the active control to go back to TAB1. I have tried docmd.gotocontrol also tried screen.activecontrol to force focus back to TAB1 from Visitor Button when form closes.
    Is there a way to force focus back to TAB1?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would try setting focus to the desired control in the On Activate event of the form. That should fire when the visitor form closes.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    k9drh is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    6

    On Activ

    it is already set to docmd.gotocontrol "callsign" which is TAB1

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    k9drh is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    6

    Thumbs up

    well you were right my mistake in spelling or something.
    I had forms.onactivate set in VB code. Removed from there and made it a macro gotocontrol and that did work.
    Thank you for jogging the brain.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, glad you got it sorted out. Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Issues with DoCmd.GoToControl
    By RaMcHiP in forum Programming
    Replies: 1
    Last Post: 05-09-2009, 08:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums