Search code examples
vbams-access-2007

Insert records into table from datasheet view form in access 2007


I have a command button on my main form that when clicked displays a datasheet view form for entering the data. I have written code before where I can add data from a single view form by adding a command button and executing the VBA code to insert values into the table.

When you have a datasheet view form, is there any way to do it differently? Also how do I create a new row automatically after the first has been entered. I am unable to enter more than 1 row at a time


Solution

  • A datasheet form is an alternative view of a form as opposed to single and continuous. If your datasheet form has a control source and 'allows additions' then you should not need to have a button to add a record. The new record will automatically appear at the bottom of the datasheet with a * at the left.