defult to new form

K

Krissy

i have created a client database and we use the database to fill in new
clients infomation, how do i get a blank/new form to open when i open my
database form instead of it opening the first clients infomation
 
R

Rainbow01

You can make a button say call it "AddNew"
in this button OnClick Event:
Docmd.OpenForm YourFormName, , , ,acFormAdd

"Krissy" 來函:
 
J

John Vinson

i have created a client database and we use the database to fill in new
clients infomation, how do i get a blank/new form to open when i open my
database form instead of it opening the first clients infomation

Two ways:

1. Open the form in Design view; view its Properties; and set the Data
Entry property to True.

The disadvantage here is that you can ONLY enter new records; you
can't edit or even browse previously entered ones.

2. Use a bit of VBA code in the Form's Open event. Again view the
form's Properties; on the Events tab click the ... icon by the Open
event, and invoke the Code Builder. Edit the two lines Access gives
you for free to:

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson[MVP]
 
R

rom45

How can I allow a user to enter their name into the blank form, hit enter,
and cause their records to appear in the form and subform?
 
Top