nman84
nman84

Reputation: 435

how to addi a record and updating record in same form MS Access

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.

Upvotes: 0

Views: 1280

Answers (1)

ChrisPadgham
ChrisPadgham

Reputation: 870

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')

Upvotes: 2

Related Questions