smercer
Registered User.
- Local time
- Tomorrow, 00:26
- Joined
- Jun 14, 2004
- Messages
- 442
Hi all
I am trying to make some code to go to a new record in a sub form (called "frm_Each_Book_subform") from a command button.
Here is the code:
the problem I am having is it works but it makes the master form go to a new record too, as well as making a blank record in the subform (called "frm_Each_Book_subform").
all I want is for the subform only to goto new record
Can anyone help me? Thanks you smarties
I am trying to make some code to go to a new record in a sub form (called "frm_Each_Book_subform") from a command button.
Here is the code:
Code:
[COLOR=Blue]Private Sub[/COLOR] cmd_New_Copy_Click()
frm_Each_Book_subform!Cost_Price.SetFocus [COLOR=Green]'sets the focus to cost_price in frm_Each_Book_subform[/COLOR]
[COLOR=Blue]With[/COLOR] frm_Each_Book_subform
[INDENT]DoCmd.GoToRecord , Cost_Price, acNewRec [COLOR=Green]'Gos to the new record[/COLOR][/INDENT]
[COLOR=Blue]End With
End Sub[/COLOR]
the problem I am having is it works but it makes the master form go to a new record too, as well as making a blank record in the subform (called "frm_Each_Book_subform").
all I want is for the subform only to goto new record
Can anyone help me? Thanks you smarties

Last edited: