Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

EOF Formate

Posted on 1998-06-17
5
Medium Priority
?
306 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
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 100 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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

927 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