Advertisement

05.29.2008 at 11:33AM PDT, ID: 23442455
[x]
Attachment Details

SQL query in vba in access 2007 doesn't work

Asked by RunToTheHills in Microsoft Access Database, Visual Basic Programming, SQL Query Syntax

Tags: , ,

the following code does not work
i have a table named ProjectTable with a field named Project Name and at least 1 record in that field that stats with the letter T

any reason why this code doesn't work?

it is run from a command button on a form

Dim x As String
  x = "SELECT * FROM [ProjectTable] WHERE [Project Name]='T%';"
  DoCmd.RunSQL x

i have also tried

Dim x As String
  x = "SELECT * FROM [ProjectTable] WHERE [ProjectTable].[Project Name]='T%';"
  DoCmd.RunSQL x

i attached the error i get
clicking the help button on that error box provides no clues either

i guess it is a syntax error but i don't know what i wrote wrong


thanks for any help
Start Free Trial
Attachments:
 
error message
error message
 
 
Loading Advertisement...
 
[+][-]05.29.2008 at 11:39AM PDT, ID: 21672026

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 11:40AM PDT, ID: 21672034

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 11:42AM PDT, ID: 21672063

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 11:44AM PDT, ID: 21672079

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 11:47AM PDT, ID: 21672122

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Visual Basic Programming, SQL Query Syntax
Tags: Microsoft, Access 2007, 2007
Sign Up Now!
Solution Provided By: DatabaseMX
Participating Experts: 4
Solution Grade: A
 
 
[+][-]05.29.2008 at 12:01PM PDT, ID: 21672278

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 04:29PM PDT, ID: 21674182

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 04:34PM PDT, ID: 21674204

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.29.2008 at 05:04PM PDT, ID: 21674334

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 12:08PM PDT, ID: 21680570

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 12:29PM PDT, ID: 21680726

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 12:33PM PDT, ID: 21723103

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628