Solved How do I move to a new record automatically in a subform (1 Viewer)

bmaccess

Member
Local time
Today, 00:25
Joined
Mar 4, 2016
Messages
78
T

That has been demonstrated 10 thousand times and every time you say that is not what you want. I think that was demoed in post 3 or 4. It was demoed using a recordset add new and using the docmd.
Code:
  Dim frm As Access.Form
  Set frm = Me.subFrmStudents.Form
  Me.subFrmStudents.SetFocus
  DoCmd.RunCommand acCmdRecordsGoToNew
  'or
  'Dim frm As Access.Form
  'Dim rs As DAO.Recordset
  'Set frm = Me.subFrmStudents.Form
  'Set rs = frm.Recordset
  'frm.Recordset.AddNew

Now this whole thing seems stupid. You said you wanted to populate the records from a combobox outside the subform. So why would you do this we will never know. The normal person would assume you select an item from the combobox and it creates a new record.

View attachment 110859

So now there is a new record
It is selected

SO HOW IS THIS NOT WHAT YOU WANT?
Hi MajP. When I saw your first post I thought and I have a feeling you the right guy that going to solve my problem. I knew you have the expertise to help me. Thanks for sticking around I appreciate it. I know others have given up already.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 03:25
Joined
May 21, 2018
Messages
8,529
Hi MajP. When I saw your first post I thought and I have a feeling you the right guy that going to solve my problem. I knew you have the expertise to help me. Thanks for sticking around I appreciate it. I know others have given up already
Not really. I just kept reposting what everyone else also posted. It was blindly throwing darts until something sticked. Still does not make sense why do this, but if that is what you want have at it.
 

bmaccess

Member
Local time
Today, 00:25
Joined
Mar 4, 2016
Messages
78
Hi MajP. I would like to thank you for your persistence. It is working now thank you very much. I think one of my fields tabstops was set to no.
But the code you provided works PERFECTLY. You made my day. THANKS FOR NOT GIVING UP ON ME.
 

Users who are viewing this thread

Top Bottom