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
Solved

MoveFirst Error

Posted on 2007-12-03
2
263 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

856 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