I have a form to input records to a table. I would like it to open on an empty add (New) instead of displaying the first record of the table. To be used by a Navigation Form which opens the input form from a button.
相关问题
- Importing data from MS Access db to PostgreSQL db
- DoCmd.TransferSpreadsheet is not recognizing works
- Is there a way to apply theme on converted access
- How to programmatically convert Access 1997 .mdb t
- Multiple (left, cross?) JOINs in MS Access
相关文章
- COALESCE, IFNULL, or NZ() function that can be use
- CurrentDb.RecordsAffected returns 0. Why?
- How to embed ms-access forms in C# module?
- Sleep Lib “kernel32” gives 64-bit systems error
- How to destroy an object
- Close all VBE windows (MS Access, VB for Aplicatio
- Compiling an Access 2007 accdb into accde
- MS Access VBA: turn query results into a single st
In the
Form_Load
event use theGoToRecord
Method of DoCmd and pass inacNewRec
for the Offset.On the property sheet, set "Data Entry" to Yes. You can turn off navigation buttons too.
You can use
acFormAdd
(value = 0) as the optionalDataMode
argument toOpenForm
. Access' help describesacFormAdd
as "The user can add new records but can't edit existing records." And actually, not only does that prevent editing of existing records, they are not even displayed in the form with that option.If you want to always use the form that way, you can set its Data Entry property to
Yes
(on the Data tab of the form's property sheet).