Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

next button want work

Status
Not open for further replies.

jackie1948

Programmer
Jan 25, 2002
78
US
OK you guys the WOI (Wall of Ignorance) is standing in my way. Will someone please peck around the the end of this wall and give me a helping hand.
Here is my question. I have a next button that does nothing.

SKIP
IF EOF()
=MESSAGEBOX("This is the Last Record.",0+64+0,"FYI")
GO BOTTOM
ENDIF
ENDIF
THISFORM.REFRESH()

what is wrong here?
I know you need more info. I have a form that has a name text box. after entering a name (last first MI)all one field. Then enter, a listbox displays the yrly historys on that person. PROBLEM: what if I entered smith john and I got smith john a. How can I hit the next button till I found the smith john that I was looking for.
 
I think you might need to supply a little more information on the indexes that you have created and are using...

J
 

SKIP
IF EOF()
=MESSAGEBOX("This is the Last Record.",0+64+0,"FYI")
GO BOTTOM
ENDIF
ENDIF
THISFORM.REFRESH()


There must be something else it should give you an error. There is one too may ENDIF. But also when you want to skip a record it's always advisible to tell VFP from which table you want to skip a record. There is usually alot going on in a form, it's not always guaranteed when you hit the next button that the current ALIAS() is the right one. Try:
Code:
select myTable
if !eof()
  skip 
else
  go bottom
  =MESSAGEBOX("This is the Last Record.",0+64+0,"FYI")
endif
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Also, how does your "history" list box get populated?
THISFORM.REFRESH() isn't necessarily going to re-fill it with the related records to the current record... look at "Requery()", or manually populate the list box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top