Make New Table Query Including Data One Step

R

rebelscum0000

Dear All,

Can some one provide me with an example How to Make-Table Query to
create the Table including the required data in one-step?

Lets say I want FileName set to "Readme" , FileExtions set to
".txt" and MyInclude set to "-1"

This is my SQL:

sQL6 = "SELECT MainExclude_Tbl.ID, MainExclude_Tbl.MyKeyword, " & _
"MainExclude_Tbl.MyAppz, MainExclude_Tbl.FileName, " & _
"MainExclude_Tbl.FolderPath, MainExclude_Tbl.FileExtension, " & _
"MainExclude_Tbl.FileType, MainExclude_Tbl.FileSize, " & _
"MainExclude_Tbl.FileModified, MainExclude_Tbl.FileAccessed, " & _
"MainExclude_Tbl.FileCreated, MainExclude_Tbl.FileAttributes, " & _
"MainExclude_Tbl.MyInclude INTO [" & MyKeywordMaNeTaSo & "_Tbl" & "] "
& _
"FROM MainExclude_Tbl " & _
"WHERE False;"

CurrentDb.Execute sQL6, dbFailOnError

Thank in advance
Regards
Antonio Macias
 
U

User

Would you not just put your criteria into the WHERE clause? Like

sQL6 = "SELECT MainExclude_Tbl.ID, MainExclude_Tbl.MyKeyword, " & _
"MainExclude_Tbl.MyAppz, MainExclude_Tbl.FileName, " & _
"MainExclude_Tbl.FolderPath, MainExclude_Tbl.FileExtension, " & _
"MainExclude_Tbl.FileType, MainExclude_Tbl.FileSize, " & _
"MainExclude_Tbl.FileModified, MainExclude_Tbl.FileAccessed, " & _
"MainExclude_Tbl.FileCreated, MainExclude_Tbl.FileAttributes, " & _
"MainExclude_Tbl.MyInclude INTO [" & MyKeywordMaNeTaSo & "_Tbl" & "] " & _
"FROM MainExclude_Tbl " & _
"WHERE MainExclude_Tbl.FileName= 'Readme' AND ... ;"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top