Solved

EOF Formate

Posted on 1998-06-17
5
303 Views
Last Modified: 2010-05-03
"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
0
Comment
Question by:hak66
[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
5 Comments
 
LVL 1

Expert Comment

by:khaledc
ID: 1463634
You may have to open the record first, can tell me what are you exactly trying to achieve, may be I can help.
0
 
LVL 1

Expert Comment

by:KEWL
ID: 1463635
I goes something like this ...

IF EOF(#filenumber) then exit do

0
 

Accepted Solution

by:
cerik earned 50 total points
ID: 1463636
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
 

Expert Comment

by:electrick
ID: 1463637
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
 

Author Comment

by:hak66
ID: 1463638
Thanks, I will be contacting you after I try it. I appreciate your time and consideration!!!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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
Course of the Month3 days, 11 hours left to enroll

630 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