0
votes

Is it possible for me to add record and update record in same form, i tried by setting Allow Edits, Allow Additions, and Data Entry to Yes, but did not work.

How do i go about doing this: Macros in two buttons or do i need to create a separate form for updating record.

1
If the form fields are bound to a data source, then adding, updating and deleting are automatically handled by Access simply by navigating to another page or exiting the form. Check the Form's "Record Source" property. - ron tornambe
That is not working so i added another button macro is not working is there a macro which does updating. Also the recordset type is Dynaset i tried Dynaset [Inconsistant updates] but this did not solve. - nman84

1 Answers

2
votes

THe simplest method is to allow updating of the current record through "Allow Edit" property of the form. For adding new records you can add a button that executes some vba to insert the record

button1_click

currentdb.execute "INSERT INTO myTable (myId, field1, field2) VALUES(999, 'field1data', 'field2data')