Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

put the data in order with this statement

Posted on 2007-12-03
6
Medium Priority
?
153 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 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