Hello
I am Looking for Access VBA code to create a table from one database X to another database Y which includes the date in name of the new table,.thank you
Function TransferTable()
Dim objAccess As Access.Application
Set objAccess = New Access.Application
'open the destination access database
Call objAccess.OpenCurrentDatabase("C:\*****.accdb")
'create table in destination db
objAccess.CurrentProject.Connection.Execute ("Create Table mytable." & Year(Date) & "." & MonthName(Month(Date)))
End Sub
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\*****.accdb", acTable, "source table", "destination table", False
End Function
I am Looking for Access VBA code to create a table from one database X to another database Y which includes the date in name of the new table,.thank you
Function TransferTable()
Dim objAccess As Access.Application
Set objAccess = New Access.Application
'open the destination access database
Call objAccess.OpenCurrentDatabase("C:\*****.accdb")
'create table in destination db
objAccess.CurrentProject.Connection.Execute ("Create Table mytable." & Year(Date) & "." & MonthName(Month(Date)))
End Sub
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\*****.accdb", acTable, "source table", "destination table", False
End Function