EOF Formate

"Data1.Recordset.MoveNext or MovePrevious" When  I type this code and hit the command button, I get error message. I know that  I need to Type EOF or BOF for each data control but I don't know how, can you please email me the code for EOF and BOF to dispaly my database within VB without getting an error message. Thanks
my email is   Hadorth11@aol.com
Thanks
hak66Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
cerikConnect With a Mentor Commented:
If you are useing a recordset form a data control as it looks, then the two functions BOF and EOF, return a boolean if the current recordset is Before the begining of file (BOF), or At the End of the File (EOF). If you want to use these, then the syntax goes like this

'for MoveNext
if Data1.Recordset.EOF then exit do '/sub/function or whatever you are in
'and for Moveprevious
if Data1.Recordset.BOF then exit do

I will also mail this to you.
0
 
khaledcCommented:
You may have to open the record first, can tell me what are you exactly trying to achieve, may be I can help.
0
 
KEWLCommented:
I goes something like this ...

IF EOF(#filenumber) then exit do

0
 
electrickCommented:
Try placing this code in your command button's click event:
If Data1.Recordset.EOF = True or Data1.Recordset.BOF = True Then
    Exit Sub
End If

Data1.Recordset.MoveNext
or
Data1.Recordset.MovePrevious

0
 
hak66Author Commented:
Thanks, I will be contacting you after I try it. I appreciate your time and consideration!!!!
0
All Courses

From novice to tech pro — start learning today.