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

inkey() 3

Status
Not open for further replies.

promizez

MIS
May 6, 2007
4
PH
our company was using foxpro 2.6

anyone can give me a source code for a programm that just display a record from a dbf.

if the user press the arrow down, it display the next record. and if the user press up arrow it display the previous record.

thanks!!

 
**
Use DBFname
BROWSE LOCK 1 FREEZE (FIELD(1)) LPARTITION REDIT
**

David W. Grewe Dave
 
set talk off
set score off
clea

use DBFname
defi wind WW from 0,0 to 24,10
BROW wind WW field1 when LL()
use

Function LL
@12,1 say field2
@13,1 say field3
@14,1 say field4 etc...


 
@dgrewe
@ety1910
thank you guys, its a big help..

anyways, is there a way that i can avoid using the browse command?

what i want is to display the content of the field1 in a single line(ex. @12,12 say field1)and can be navigated by arrow key(up&down) for records to skip,and when i press the enter key what ever record is displayed must be saved in a variable.

any one can help for this one?
 
There is noway I can think of without Designing a screen and a program to call it. If not wanting to use the browse command because the user can change the data or is to big on the screen, try this code.
This is VFP code so you might have to change a few things.

store "" to MemvarNAme
DEFINE WINDOW somename FROM 12,12 TO 15,30 IN SCREEN TITLE '' NONE NOGROW NOCLOSE NOFLOAT NOMDI NOZOOM
ACTIVATE WINDOW somename
USE dbfname
BROWSE FIELDS Fieldname IN WINDOW somename TITLE '' NOCAPTIONS NOAPPEND NODELETE NOEDIT
MemVarNAme = Fieldname
USE
RELEASE WINDOWS somename
@ 12,12, say memvarName


David W. Grewe Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top