How to open a blank form for adding a new record

  • Follow


Hello,

I have a form for adding/viewing employee records.  I can open the form, 
view records and using the navigation button, add a new record just fine. 
However, I'd like to open the form using a command button so that all fields 
are blank and a new record can immediately been added without having to use 
the navigation button.  Can anyone help me figure out how to do this?

TIA,
Rich
0
Reply Utf 11/13/2007 9:20:02 PM

On Tue, 13 Nov 2007 13:20:02 -0800, rich wrote:

> Hello,
> 
> I have a form for adding/viewing employee records.  I can open the form, 
> view records and using the navigation button, add a new record just fine. 
> However, I'd like to open the form using a command button so that all fields 
> are blank and a new record can immediately been added without having to use 
> the navigation button.  Can anyone help me figure out how to do this?
> 
> TIA,
> Rich

Code the command button's Click event:
DoCmd.OpenForm "FormName", , , , acFormAdd

Change "FormName" to whatever the actual name of the form to be opened
is.
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
1
Reply fredg 11/13/2007 9:30:08 PM


You could open the form in data-entry mode.
-- 
Maurice Ausum


"rich" wrote:

> Hello,
> 
> I have a form for adding/viewing employee records.  I can open the form, 
> view records and using the navigation button, add a new record just fine. 
> However, I'd like to open the form using a command button so that all fields 
> are blank and a new record can immediately been added without having to use 
> the navigation button.  Can anyone help me figure out how to do this?
> 
> TIA,
> Rich
0
Reply Utf 11/13/2007 9:34:00 PM

Perfect!!!

Thanks Fred!!!





"fredg" wrote:

> On Tue, 13 Nov 2007 13:20:02 -0800, rich wrote:
> 
> > Hello,
> > 
> > I have a form for adding/viewing employee records.  I can open the form, 
> > view records and using the navigation button, add a new record just fine. 
> > However, I'd like to open the form using a command button so that all fields 
> > are blank and a new record can immediately been added without having to use 
> > the navigation button.  Can anyone help me figure out how to do this?
> > 
> > TIA,
> > Rich
> 
> Code the command button's Click event:
> DoCmd.OpenForm "FormName", , , , acFormAdd
> 
> Change "FormName" to whatever the actual name of the form to be opened
> is.
> -- 
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
> 
0
Reply Utf 11/14/2007 2:20:04 PM

3 Replies
1205 Views

(page loaded in 8.122 seconds)

Similiar Articles:
















7/21/2012 5:56:39 AM


Reply: