J
JB
Hello
The database in question has a Menu where the user can choose several
options one of which is a form which displays his own data in a list. In
that form he can then choose the record he wants to work with which opens
the main form. ('Clients')
I'd like to add in the Menu a command to Add a new Client and have the
Client form open in New Record.
Changing the form property 'Data Entry' to Yes worked, but it it meant when
the user chooses the record he wants to work with it also opens in New
Record rather than the chosen one.
From seeing other databases that this works for I've done a procedure as
follows.
Private Sub New_Click()
Dim frm As Form
Me.Visible = False
DoCmd.OpenForm FormName:="frmClients", DataMode:=acAdd
Set frm = Forms!frmClients
frm.SetFocus
frm![ClientName].SetFocus
frm!cmdAddNew.Visible = True
frm!cmdSearch.Enabled = False
frm!cmdReports.Enabled = True
End Sub
But it's not working.
Can someone please help with this
Thanks
Jen
The database in question has a Menu where the user can choose several
options one of which is a form which displays his own data in a list. In
that form he can then choose the record he wants to work with which opens
the main form. ('Clients')
I'd like to add in the Menu a command to Add a new Client and have the
Client form open in New Record.
Changing the form property 'Data Entry' to Yes worked, but it it meant when
the user chooses the record he wants to work with it also opens in New
Record rather than the chosen one.
From seeing other databases that this works for I've done a procedure as
follows.
Private Sub New_Click()
Dim frm As Form
Me.Visible = False
DoCmd.OpenForm FormName:="frmClients", DataMode:=acAdd
Set frm = Forms!frmClients
frm.SetFocus
frm![ClientName].SetFocus
frm!cmdAddNew.Visible = True
frm!cmdSearch.Enabled = False
frm!cmdReports.Enabled = True
End Sub
But it's not working.
Can someone please help with this
Thanks
Jen