Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accessing a query from a sql string 1

Status
Not open for further replies.

elpico

Programmer
May 14, 2003
19
0
0
GB
I've got this piece of sql

SELECT [My Query].* INTO ConfigFileAllSites
FROM [My Query];

that runs this query

SELECT [site].[sitename], configfile.*, [site].[envid]
FROM site, configfile
ORDER BY [site].[sitename], [ConfigFile].[Module], [ConfigFile].[ConfigFileName];

- which runs fine from the standard Access query window - However, I want to run it from within a VB function linked to my form, but its not recognizing my query within the string - any idea if this is possible to do, and if so how?

Thanks,
e.
 
dim strsql
strsql = "SELECT [My Query].* INTO ConfigFileAllSites
FROM [My Query]"
currentdb.execute strsql,dbfailonerror
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top