kspacja
kspacja

Reputation: 4874

How to add new record to table in Ms Access by form?

I made form by wizard, but when I run this, first I have in fields first record from table, and I can edit this record, but I don't want to have this. I want to have blank field and when I click add button i can add new record, not edit....

Upvotes: 3

Views: 74369

Answers (2)

iDevlop
iDevlop

Reputation: 25252

Change the form's properties:

AllowEdit = False to prevent changing existing records
and/or
DataEntry = True to arrive on the New Record whenever the user opens the form.

Upvotes: 18

Wafa
Wafa

Reputation: 1

Create a macro for this. 1. In create tab select macro. 2. Under cation field in macro select open form. 3. Below in property box select the form you want to perform task with 4. Then in Data Mode select Add.

Then when ever you run this Macro your form will open to enter a new record and not editing existing record.

The only problem here would be when you open form then it will open in edit existing record mode but when you open corresponding macro form will open in add mode, so in order to counter this you can name your Macro as AutoExec so the macro will run itself when you open the database.;

Upvotes: 0

Related Questions