subform - blank line

pbuethe

Returning User
Local time
Today, 09:34
Joined
Apr 9, 2002
Messages
210
I have figured out how to set the focus on my subform, but it goes to the (first field on the) first line. How can I get the focus to set on the first field on the blank line so it is ready to continue adding records in the subform?
 
I tried it with the following code, to set the focus to the subform then go to the new record:

Me![sfrmStatusAll].SetFocus
DoCmd.GoToRecord acDataForm, "sfrmStatusAll", acNewRec

but it tells me that I can't use GoToRecord because the form is not open. Isn't it open if it has the focus?

I tried DoCmd.OpenForm before the set focus, but it said the form name was misspelled or nonexistent.

What am I doing wrong or missing?
 
Remove the form name from the GoTo statement
it's more like; DoCmd.GoToRecord , "", acNewRec
 

Users who are viewing this thread

Back
Top Bottom