Results 1 to 2 of 2
  1. #1
    dhicks is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    36

    Run-time error when opening a new record

    Hello,



    I have a form button that will open a new record in the subform in order to enter data. However, if I want to add an additional record after that and click on the button again, I get a run-time error 2105. Here is the code for the button:

    Click image for larger version. 

Name:	vba error.PNG 
Views:	12 
Size:	9.5 KB 
ID:	34938Click image for larger version. 

Name:	LL Bug.PNG 
Views:	12 
Size:	6.1 KB 
ID:	34939

    Any idea of where I have missed the boat on this? Many thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    me.subform is not in the recordset. Use the BUILDER , it will tell you the correct path name....

    i.e.: me.subform.form.recordset

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

Similar Threads

  1. Replies: 4
    Last Post: 01-17-2018, 05:34 PM
  2. Run time error 2137 but record does exist
    By coach32 in forum Programming
    Replies: 5
    Last Post: 06-10-2015, 05:41 PM
  3. Replies: 3
    Last Post: 06-06-2012, 12:45 PM
  4. Replies: 1
    Last Post: 06-04-2012, 03:37 PM
  5. Replies: 2
    Last Post: 01-05-2012, 04:23 AM

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