Solved

EOF Formate

Posted on 1998-06-17
5
298 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
5 Comments
 
LVL 1

Expert Comment

by:khaledc
Comment Utility
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
Comment Utility
I goes something like this ...

IF EOF(#filenumber) then exit do

0
 

Accepted Solution

by:
cerik earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, I will be contacting you after I try it. I appreciate your time and consideration!!!!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 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

11 Experts available now in Live!

Get 1:1 Help Now