Solved

MoveFirst Error

Posted on 2007-12-03
2
258 Views
Last Modified: 2012-08-13
In this portion of the code in VB6 I get an error when Procedure2 is used and it occurs on the MoveFirst command at the end.  Any ideas?

Procedure2:

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

If Not Combo1.Text = "-All-" Then
esql = esql & " And frmRegistrationCSWText1 = " & ravi & Program & ravi
End If

rec.Open (esql), conn, adOpenStatic, adLockOptimistic


Com(2) = rec.RecordCount
Text2.Text = Com(2)


rec.MoveFirst
0
Comment
Question by:al4629740
2 Comments
 
LVL 20

Accepted Solution

by:
hes earned 500 total points
ID: 20400288
What error ?
And why do you need to do a movefirst ?
0
 

Author Comment

by:al4629740
ID: 20400553
nevermind, I got the answer.  Thanks anyways.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now