**RESOLVED**SQL Statement - Need a little HELP!
Ok, I thought that I was done, then the Management team pull me back!
On one of my forms I needed to view only records that follow a certain criteria....within the OnLoad event I have the following code:
VB Code:
Dim rs as Recordset
Set rs = New Recordset
rs.Open "SELECT AgentCompleted FROM Main WHERE AgentCompleted <> ' " & Text1.Text & "'", MyDataEnvironment, MyConnection
rs.MoveFirst
rs.Close
' so on
' and so on
Now this workd great, it opens to the first record that fits the SQL criteria..but now on the form I have a command button for "Next Record"...I wrote the following code inside this command:
VB Code:
Dim rs as Recordset
Set rs = New Recordset
rs.Open "SELECT AgentCompleted FROM Main WHERE AgentCompleted <> ' " & Text1.Text & "'", MyDataEnvironment, MyConnection
rs.MoveNextrs.Close
'so on
but this SQL will not work....it does not give me an error message, but it will not move to the next available record???
Any suggestions??
Thanks