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 2008

Tip: Looking for answers? Try searching our database.

opening forms to a blank record in Access 97

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Beeyen - 20 Mar 2008 14:56 GMT
I am trying to have Access 97 open up to a blank record  to be filled in but
still be able to search for old records using the search or find function.  
Currently, if I set the Data Entry to yes, when I open the form it opens to a
blank record but I can not search to bring up a previous record.
Allen Browne - 20 Mar 2008 15:18 GMT
Leave DataEntry as No.

Add this code the the Event Procedure for the form's Load event:

Private Sub Form_Load()
   If Not Me.NewRecord Then
       RunCommand acCmdRecordsGotoNew
   End If
End Sub

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I am trying to have Access 97 open up to a blank record  to be filled in
>but
> still be able to search for old records using the search or find function.
> Currently, if I set the Data Entry to yes, when I open the form it opens
> to a
> blank record but I can not search to bring up a previous record.
Stockwell43 - 20 Mar 2008 16:11 GMT
Set the Data Entry to No

Then open the forms properties and in the "Open" event procedure place this
code:
DoCmd.GoToRecord , , acNewRec

No when you open the form it will automatically open to a blank record. and
if you want it cursor to automatically blink in the first field try this:
Me.your field name.SetFocus

> Leave DataEntry as No.
>
[quoted text clipped - 12 lines]
> > to a
> > blank record but I can not search to bring up a previous record.
Beeyen - 22 Mar 2008 13:36 GMT
Thank you Mr Browne, It works great and I appreciate the quick response.

> Leave DataEntry as No.
>
[quoted text clipped - 12 lines]
> > to a
> > blank record but I can not search to bring up a previous record.
 
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.