Solved

put the data in order with this statement

Posted on 2007-12-03
6
151 Views
Last Modified: 2010-04-30
I want to put this data in order by name in vb6.  How do I do this?

esql = "select * From frmRegistrationCSW Where frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1 And frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101 )And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 ) "
0
Comment
Question by:al4629740
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 25

Expert Comment

by:imitchie
ID: 20400843
esql = "select * From frmRegistrationCSW Where frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1 And frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101 )And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 ) ORDER BY NAME"
0
 

Author Comment

by:al4629740
ID: 20401001
I get an error by the "And statement"
0
 
LVL 25

Expert Comment

by:imitchie
ID: 20401276
interesting, you had an error in the original SQL

esql = "select * From frmRegistrationCSW Where frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1 And frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101) And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 ) ORDER BY NAME"
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 20401954
If not try like this
esql = "select * From frmRegistrationCSW Where (frmRegistrationCSWCheck3 = 1 And frmRegistrationCSWCheck10 =1) And (frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101) And frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 )) ORDER BY NAME"
0
 

Author Comment

by:al4629740
ID: 20403506
There was no error in the original SQL.
0
 
LVL 25

Accepted Solution

by:
imitchie earned 500 total points
ID: 20404941
I thought it's due to the lack of space between ) and frmRegis...
i.e.  101)And frmRegistrationCSWText15
in the original. If not, then you must be using Access

esql = "select * From frmRegistrationCSW Where ((frmRegistrationCSWCheck3 = 1) And (frmRegistrationCSWCheck10 =1) And (frmRegistrationCSWText15  >= convert( datetime, " & ravi & BeginDate & ravi & " , 101)) And (frmRegistrationCSWText15  <= convert( datetime, " & ravi & EndDate & ravi & " , 101 ))) ORDER BY NAME"
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question