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 Programming / September 2005

Tip: Looking for answers? Try searching our database.

Bound Form opens to new record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mark - 19 Jul 2005 18:18 GMT
We have a bound form that opens by default to the first of several thousand
records.  We'd like the form to automatically open to a new blank record.
What code is necessary to do this?

Thanks in advance.

Mark
Rick Brandt - 19 Jul 2005 18:25 GMT
> We have a bound form that opens by default to the first of several
> thousand records.  We'd like the form to automatically open to a new
[quoted text clipped - 3 lines]
>
> Mark

Use the optional acFormAdd argument if opening from code or set the
DataEntry property of the form to Yes in design view.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

JonOfAllTrades - 30 Sep 2005 14:54 GMT
> We have a bound form that opens by default to the first of several thousand
> records.  We'd like the form to automatically open to a new blank record.
[quoted text clipped - 3 lines]
>
> Mark

You can also add code such as this to your form's On_Open event, and it will
always run.  You won't have to hunt down all buttons that open the form.

Private Sub Form_Open(Cancel As Integer)
   DoCmd.GoToRecord , , acNewRec
End Sub

Using DataEntry hides all existing records, though this may be what you're
looking for.
 
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.