Link to home
Start Free TrialLog in
Avatar of flfmmqp
flfmmqp

asked on

Insert Blank Row

Simple question but I am too burnt out today to remember the simple answer.  How can you insert a blank row into an access table.  My table is called tmpMigration2 and I want to do this in the VBA.
ASKER CERTIFIED SOLUTION
Avatar of Markus Fischer
Markus Fischer
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jeffrey Coachman
flfmmqp,

harfang is correct.

Can you explain why you need this blank Record?

I mean, you could very well insert a null into one of the fields, than save the record.
In effect creating a Blank Record.
Like so:

Private Sub cmdInsertBlank_Click()
    'Creates a new record
    DoCmd.GoToRecord , , acNewRec
    'Inserts a Null in one Field
    Me.AnyFieldInYourForm = Null
    'Saves the record
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    'Displays a message after inserting the blank record,
    'so the user won't think it is a "New" record, and start entering data.
    MsgBox "Here is your Blank Record"
End Sub

But this is non-standard and might cause problems.

But again, Why do you need this functionality?