Using RunCommand RecordsGoToNew

johnnixon

Registered User.
Local time
Today, 22:53
Joined
Jul 27, 2006
Messages
17
I'm a newbie at code and finding the Access help very hard to make sense of. It says that I can precede RunCommand with DoCmd object or Application object. Of course, DoCmd.Run...etc works, but is occasionally giving me an error 'The command or action "RecordsGoToNew" isn't available now'. The circumstances in which this happens seem to be hard to fix and would take a page to explain, so I thought I might solve the problem using an appn obj. It also says that the appn obj includes collections such as forms. I would like to do something like "Forms.SubFormA.RunCommand AcCmdRecordsGoToNew", but can't find a syntax which works. Anybody kind enough to give me a sample of the correct syntax, please? (using Access97). Any help appreciated.
 
Last edited:
If form is already opened

DoCmd.GoToRecord , , acNewRec
 
Brilliant, jk10

Works beautifully.

Much appreciate it.

Kind regards

John
 

Users who are viewing this thread

Back
Top Bottom