I am writing a database that needs me to create a database in another folder.......naming it according to the user
I can create the database
Dim strExportdbName As String
Dim strDestination As String
strExportdbName = Forms!Start!SiteName & " Export.mdb"
strDestination = "C:\VET\" & strExportdbName
Set dbsExport = DBEngine.Workspaces(0).CreateDatabase(strDestination, DB_LANG_GENERAL)
But then cannot get the query to make a table in it.
Is this possible?
strExportQ1 = "SELECT DISTINCTROW Question1.* "
strExportQ1 = strExportQ1 & "INTO Q1Export IN 'strDestination'"
strExportQ1 = strExportQ1 & "FROM Question1 "
strExportQ1 = strExportQ1 & "WHERE ((Question1.ToBeExported=Yes));"
DoCmd.RunSQL strExportQ1
That is the destination database may change depending on the user.
Any suggestions would be greatly appreciated
I can create the database
Dim strExportdbName As String
Dim strDestination As String
strExportdbName = Forms!Start!SiteName & " Export.mdb"
strDestination = "C:\VET\" & strExportdbName
Set dbsExport = DBEngine.Workspaces(0).CreateDatabase(strDestination, DB_LANG_GENERAL)
But then cannot get the query to make a table in it.
Is this possible?
strExportQ1 = "SELECT DISTINCTROW Question1.* "
strExportQ1 = strExportQ1 & "INTO Q1Export IN 'strDestination'"
strExportQ1 = strExportQ1 & "FROM Question1 "
strExportQ1 = strExportQ1 & "WHERE ((Question1.ToBeExported=Yes));"
DoCmd.RunSQL strExportQ1
That is the destination database may change depending on the user.
Any suggestions would be greatly appreciated