Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Next record vs previous record
Message
From
21/04/2008 17:51:21
 
 
To
21/04/2008 15:40:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01312026
Message ID:
01312252
Views:
21
>thank you for reply,
>Why not simply set the controlsource of the textbox to match the appropriate field? i will
>
>
>Another thing is that your skip logic is very backwards. You should skip first, then check for EOF(). i see record number 2
>************************
>i need to know if this code can work or not,
>when i run it i see only the first record...no skip
>


Do you really have the SELECT statement in your NEXT button????????????????????

If so, analyze the code.

1. Do a select statement that generates a set of records. This will put you in that work area and also put you at the first record in that record set.

2. Skip a record. Since you are ALWAYS at record number 1 you will ALWAYS be at record number 2.











>thanks
>
>
>>Why not simply set the controlsource of the textbox to match the appropriate field?
>>
>>Another thing is that your skip logic is very backwards. You should skip first, then check for EOF().
>>SKIP
>>IF EOF()
>>   =messagebox("trying to go past end of file - resetting to last record")
>>   GO BOTT
>>ENDIF
>>...set textbox values
>>
>>
>>
>>>thank you for reply
>>>
>>>i need to display it at textboxes at myform record by record.
>>>
>>>What doesn't work?
>>>IF !EOF()&&&
>>> skip && mean next record to end of file
>>>
>>>thanks
>>>
>>>>What have you done so far? What doesn't work?
>>>>
>>>>>hi all,
>>>>>
>>>>>any help to active this as command button next or prev.record
>>>>>
>>>>>SELECT;
>>>>> TAlias1.time1,;
>>>>> TAlias1.date1,;
>>>>> TAlias1.roomno,;
>>>>> TAlias1.place1,;
>>>>> TAlias1.empno,;
>>>>> TAlias2.mobile,;
>>>>> TAlias2.tel,;
>>>>> TAlias2.empname,;
>>>>> TAlias1.discerror,;
>>>>> TAlias1.sno;
>>>>> FROM trans1 TAlias1, emp1 TAlias2 ;
>>>>> WHERE  TAlias1.empno = TAlias2.empno;
>>>>>     INTO CURSOR crsMyCursor READWRITE
>>>>> SELECT crsMyCursor
>>>>>
>>>>> IF !EOF()&&&
>>>>>   skip
>>>>>
>>>>>   THISFORM.TEXT3.Value=crsMyCursor.empname
>>>>>   THISFORM.TEXT1.Value=crsMyCursor.SNO
>>>>>   THISFORM.TEXT2.Value=crsMyCursor.EMPNO
>>>>>   THISFORM.TEXT10.Value=crsMyCursor.discerror
>>>>>   THISFORM.TEXT13.Value=crsMyCursor.time1
>>>>>   THISFORM.TEXT12.Value=crsMyCursor.date1
>>>>>   THISFORM.TEXT16.Value=crsMyCursor.roomno
>>>>>   THISFORM.TEXT15.Value=crsMyCursor.place1
>>>>>ELSE
>>>>>   MESSAGEBOX("End Off File")
>>>>>endif
>>>>>
>>>>>
>>>>>thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform