Results 1 to 2 of 2
  1. #1
    JRPMD is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    1

    To open form with a specified record

    Hello , I have a form , Form1 , in wich I can see the second record of a query.
    I wrote this code : DoCmd.GoToRecord , , acGoTo, 2 at the OnOpen event and it works properly showing the second record of the query with an Autonumber field.
    Now I made a new form , Form2 , from a different table , and Form1 as a subform ,
    with this code : DoCmd.GoToRecord ,"Form1" , acGoTo, 2 .
    But it doesn't works.
    I get this message : Error 2489 , the object "Form2" is not open.


    How can do this ?
    Thank you very much!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Perhaps one of the first two choices in THIS LIST will work for you.

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

Similar Threads

  1. Replies: 10
    Last Post: 12-17-2014, 03:31 PM
  2. Replies: 4
    Last Post: 12-16-2014, 05:08 PM
  3. Replies: 2
    Last Post: 03-13-2013, 06:13 PM
  4. Replies: 3
    Last Post: 08-26-2012, 10:04 PM
  5. Replies: 1
    Last Post: 05-03-2012, 02:25 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