Try something like this. The code is on the main form.
Me.TheSubFormObject.SetFocus
DoCmd.GoToRecord , , acNewRec
Just wondering a bit. In which circumstances do you want to execute the code? Bit silly doing it if the main form doesn't contain data, or if you want to edit data on main from before adding a new record on the sub form.
Not sure if "dataindtastning" is the same as "Allow Additions" in English but normally default value for that is "yes" (true) and if for some reason its been set to no (false) then focus and acNewRec isnt go to work at all.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.