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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's moving the record pointer?

Status
Not open for further replies.

jimstarr

Programmer
Feb 6, 2001
975
US
I'm calling a form, and in so doing, the record pointer is being moved, inappropriately.

To try and see what's going on I've put the statement

?RECNO()

immediately before the DO FORM and also as the first statement of the form's LOAD. The record pointer somehow changes before the LOAD. What are the possibilities? (VFP9)

Thanks!!!

Jim
 
Jim,

Does the form have a private data session? If so, is it possible that the form is re-opening the table in that data session? If so, the second RECNO() would always show the first logical record in the newly-opened table.

Also, are you sure that you are looking at the same table in both cases? As you know, RECNO() will report on the currently selected table. Do you see the same behaviour if you do ? RECNO("MyTableAlias")?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I figured it out. It was not a private data session, but the table was being re-opened in the Data Environment. I never use DE's, but somehow this particular table was there. When I removed it, the problem disappeared. Thanks!


Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top