Hello!
I have the following VBA code:
Dim dbs As DAO.Database
Set dbs = CurrentDb
DoCmd.SetWarnings False
On Error Resume Next
dbs.TableDefs.Delete "MadeTablebyQuery1"
On Error Goto 0
DoCmd.OpenQuery "MakeTableQuery1", , acReadOnly
DoCmd.SetWarnings True
I would like to create a module with a Public Function called RunMakeTableQuery() so I can use VBA to call this function and input the query name and table name instead of using this entire code every time: e.g., RunMakeTableQuery(MakeTableQuery1, MadeTablebyQuery1)
PLEASE HELP!!!