Senin, 23 Juli 2012

[MS_AccessPros] Add/Delete record on the same form

 

I have a form with data source from a query. I would like to allow the user to create new record(s) (base on a button on the form header) and to delete selected records (base on a button next to the record display).

However, if I enable the "Allow additions" attribute on the form, there is always a 'new record' appears at the end of the form which I don't want it to appear until the 'Add/Create' button is clicked. If I set the "Allow additions" to NO, the create new button will not work.

The code for the create new record is
DoCmd.GoToRecord , , acNewRec

and the code for the delete is

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

How do you circumvent this problem? Thanks.

Thomas

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar