opening forms to a blank record in Access 97

B

Beeyen

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.
 
A

Allen Browne

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
 
S

Stockwell43

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top