Wallegator
Programmer
I have data in an Excel spreadsheet that I want to create a new record for in an Access table. I can get the Access database and the table open but I can't figure out which VBA command to use to tell Access to add a record and add the Excel data. I know that I can use Add-Ins to do this but my client wants to do it with VBA and a command button. Thank you in advance for any help. My existing "working" code is shown below.
Set appAccess = CreateObject("Access.Application.9"
appAccess.OpenCurrentDatabase "c:\myfolder\mydatabase.mdb"
appAccess.DoCmd.OpenTable ("MyTable"
appAccess.Visible = True
Set appAccess = CreateObject("Access.Application.9"
appAccess.OpenCurrentDatabase "c:\myfolder\mydatabase.mdb"
appAccess.DoCmd.OpenTable ("MyTable"
appAccess.Visible = True