Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2007

Tip: Looking for answers? Try searching our database.

Clear a form on entry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nancy - 06 Mar 2007 19:39 GMT
How does one clear all of the fields when entering a form?  I have two forms
(one query and one data entry) and the user does not want to see the previous
results.

I attempted to use the forms on open and on load events to set the field to
null (field.value = NULL) but it did not like that.  Is there anything else I
can do?

Thanks for all of your help!
Daniel - 06 Mar 2007 21:06 GMT
For the form in question simply set the 'Data Entry' property to Yes.  This
way when your user opens the form it will be on a new blank record.

You can also blank each control by code such as
Me.ControlName=""

Daniel P

> How does one clear all of the fields when entering a form?  I have two forms
> (one query and one data entry) and the user does not want to see the previous
[quoted text clipped - 5 lines]
>
> Thanks for all of your help!
Nancy - 06 Mar 2007 22:16 GMT
Thank you Daniel, it worked perfectly.

> For the form in question simply set the 'Data Entry' property to Yes.  This
> way when your user opens the form it will be on a new blank record.
[quoted text clipped - 13 lines]
> >
> > Thanks for all of your help!
Ofer Cohen - 06 Mar 2007 21:08 GMT
Three ways to open the form for data entry, empty form

1. Set the form DataEntry Property to Yes
====================================
2. On the On open form command line, specify that it for data entry
docmd.OpenForm "FormName",,,,acFormAdd
====================================
3. On the OnLoad event of the form, insert the code to move to a new record
DoCmd.GoToRecord , , acNewRec

Signature

Good Luck
BS"D

> How does one clear all of the fields when entering a form?  I have two forms
> (one query and one data entry) and the user does not want to see the previous
[quoted text clipped - 5 lines]
>
> Thanks for all of your help!
Nancy - 06 Mar 2007 22:16 GMT
Thank you Ofer, that worked perfect.

> Three ways to open the form for data entry, empty form
>
[quoted text clipped - 15 lines]
> >
> > Thanks for all of your help!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.